Adjust the resolution of a graph-based community detection algorithm by greedily merging clusters together. At each step, the pair of clusters that yield the highest modularity are merged.
A graph object from igraph, usually where each node represents an observation.
Factor specifying the cluster identity for each node.
Integer scalar specifying the number of clusters to obtain.
Integer scalar specifying the number of merge steps.
This function is similar to the
cut_at function from the igraph package,
but works on clusters that were not generated by a hierarchical algorithm.
The aim is to facilitate rapid adjustment of the number of clusters without having to repeat the clustering -
or, even worse, repeating the graph construction, e.g., in
A vector or factor of the same length as
containing the desired number of merged clusters.
cut_at, for a faster and more natural adjustment when using a hierarchical community detection algorithm.
NNGraphParam, for a one-liner to generate graph-based clusters.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.