EXPERIMENTAL file-backed landmark graph clustering
Source:R/massive_clustering.R
massive_cluster_landmarks.RdRuns the existing native Leiden, Louvain, or Walktrap implementation on a resident landmark graph. Saved CPU- or CUDA-built KNN rows are streamed through inverse-distance weighted community voting. A supplied landmark selection preserves reference labels at their original source rows.
Usage
massive_cluster_landmarks(
reference_graph,
knn,
output,
method = c("leiden", "louvain", "walktrap"),
selection = NULL,
backend = "cpu",
n.cores = 1L,
chunk_rows = NULL,
memory_limit = "8GB",
resolution = 1,
n_iterations = 10L,
n_runs = 1L,
steps = 4L,
seed = 1L,
checkpoint = FALSE,
checkpoint_every = 100L,
resume = FALSE
)Arguments
- reference_graph
A
knn_graph()result for the landmark rows.- knn
Saved CPU- or CUDA-built query-to-landmark graph from
massive_landmark_knn().- output
New prefix for label and confidence output files.
- method
"leiden","louvain", or"walktrap".- selection
Optional result of
massive_select_landmarks()from the query source; selected rows retain their fitted community labels.- backend
"cpu"for all methods, or"cuda"for landmark-graph Louvain and Leiden. Streamed community voting remains on CPU. A CUDA request fails explicitly if the backend is unavailable.- n.cores
CPU workers used for weighted community voting.
- chunk_rows
Maximum query rows per batch.
- memory_limit
Conservative RAM budget for voting buffers.
- resolution
Modularity resolution for Leiden or Louvain.
- n_iterations
Maximum local-moving passes.
- n_runs
Independent seeded graph-clustering runs.
- steps
Walktrap random-walk length.
- seed
Random seed for Leiden or Louvain.
- checkpoint
Save landmark communities and completed output rows.
- checkpoint_every
Save progress after this many query batches.
- resume
Continue from matching partial outputs and checkpoint.