View source: R/multi_coarsen.R
coarsen_graph_multilevel | R Documentation |
Implements the multi-level edge-based local variation coarsening based on Loukas (2019). The method updates the Laplacian and a subspace U at each level, ensuring stable re-orthonormalization and forcing at least one contraction if needed.
coarsen_graph_multilevel(
A,
n,
k = 2,
epsilon_prime = 0.5,
max_levels = NULL,
verbose = FALSE
)
A |
A sparse adjacency matrix (dgCMatrix) of the undirected graph. |
n |
Target number of vertices after coarsening (must be < N). |
k |
Dimension of the subspace to preserve (e.g., first k eigenvectors of L). |
epsilon_prime |
Error threshold for restricted spectral approximation (used as a heuristic). |
max_levels |
Maximum levels allowed (default: log2(N/n)), just to prevent infinite loops. |
verbose |
If TRUE, prints progress messages. |
A list:
A_coarse |
The coarsened adjacency matrix. |
P |
The overall reduction matrix mapping original N to final n. |
info |
A list with final_epsilon, final_n, levels. |
Loukas, A. (2019). "Graph Reduction with Spectral and Cut Guarantees." Journal of Machine Learning Research, 20(116):1–42.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.