Basic Functions
community.prism()Pairwise Resolution Iteration via Subgraph Modularity (PRISM)
Iteratively tests pairwise unions of communities for a modularity gain at the subgraph level and merges communities whenever the union increases modularity relative to the communities' separate memberships. Iteration continues until no pair of communities yields a consistent, positive gain, at which point the partition is returned. The approach operates on single subgraphs rather than the full network at each comparison, which is intended to overcome the modularity resolution limit described by Fortunato and Barthelemy (2007)
community.prism(
network,
algorithm = c("edge_betweenness", "fast_greedy", "fluid", "infomap", "label_prop",
"leading_eigen", "leiden", "louvain", "optimal", "spinglass", "walktrap"),
allow.singleton = FALSE,
seed = NULL,
...
)
network |
Matrix or |
algorithm |
Character or
|
allow.singleton |
Boolean (length = 1).
Whether singleton or single node communities should be allowed.
Passed on to the function selected via |
seed |
Numeric (length = 1).
Sets seed for reproducible results.
Defaults to |
... |
Additional arguments to be passed on to the community
detection function selected via |
Returns a named vector of final community memberships obtained by iterating pairwise resolution over subgraph modularity until convergence (i.e., until no further consistent modularity gain is found)
Alexander P. Christensen <alexpaulchristensen@gmail.com>
Granell, C., Gomez, S., & Arenas, A. (2012). Hierarchical multiresolution method to overcome the resolution limit in complex networks. International Journal of Bifurcation and Chaos, 22(07), 1250171.
Fortunato, S., & Barthelemy, M. (2007). Resolution limit in community detection. Proceedings of the National Academy of Sciences, 104(1), 36-41.
# Load data
wmt <- wmt2[,7:24]
# Estimate network
network <- EBICglasso.qgraph(data = wmt)
# Compute PRISM memberships (Louvain-based consensus)
community.prism(network)
# Compute PRISM memberships (single-algorithm community detection)
community.prism(network, algorithm = "walktrap")