View source: R/community.consensus.R
community.consensus | R Documentation |
Applies the consensus clustering method introduced by (Lancichinetti & Fortunato, 2012). The original implementation of this method applies a community detection algorithm repeatedly to the same network. With stochastic networks, the algorithm is likely to identify different community solutions with many repeated applications.
community.consensus(
network,
order = c("lower", "higher"),
resolution = 1,
consensus.method = c("highest_modularity", "iterative", "most_common", "lowest_tefi"),
consensus.iter = 1000,
correlation.matrix = NULL,
allow.singleton = FALSE,
membership.only = TRUE,
...
)
network |
Matrix or |
order |
Character (length = 1).
Defaults to |
resolution |
Numeric (length = 1).
A parameter that adjusts modularity to allow the algorithm to
prefer smaller ( |
consensus.method |
Character (length = 1).
Defaults to
|
consensus.iter |
Numeric (length = 1).
Number of algorithm applications to the network.
Defaults to |
correlation.matrix |
Symmetric matrix.
Used for computation of |
allow.singleton |
Boolean (length = 1).
Whether singleton or single node communities should be allowed.
Defaults to |
membership.only |
Boolean.
Whether the memberships only should be output.
Defaults to |
... |
Not actually used but makes it easier for general functionality in the package |
The goal of the consensus clustering method is to identify a stable solution across algorithm applications to derive a "consensus" clustering. The standard or "iterative" approach is to apply the community detection algorithm N times. Then, a co-occurrence matrix is created representing how often each pair of nodes co-occurred across the applications. Based on some cut-off value (e.g., 0.30), co-occurrences below this value are set to zero, forming a "new" sparse network. The procedure proceeds until all nodes co-occur with all other nodes in their community (or a proportion of 1.00).
Variations of this procedure are also available in this package but are experimental. Use these experimental procedures with caution. More work is necessary before these experimental procedures are validated
At this time, seed setting for consensus clustering is not supported
Returns either a vector with the selected solution
or a list when membership.only = FALSE
:
selected_solution |
Resulting solution from the consensus method |
memberships |
Matrix of memberships across the consensus iterations |
proportion_table |
For methods that use frequency, a table that reports those frequencies alongside their corresponding memberships |
Hudson Golino <hfg9s at virginia.edu> and Alexander P. Christensen <alexpaulchristensen@gmail.com>
Louvain algorithm
Blondel, V. D., Guillaume, J.-L., Lambiotte, R., & Lefebvre, E. (2008).
Fast unfolding of communities in large networks.
Journal of Statistical Mechanics: Theory and Experiment, 2008(10), P10008.
Consensus clustering
Lancichinetti, A., & Fortunato, S. (2012).
Consensus clustering in complex networks.
Scientific Reports, 2(1), 1–7.
Entropy fit indices
Golino, H., Moulder, R. G., Shi, D., Christensen, A. P., Garrido, L. E., Nieto, M. D., Nesselroade, J., Sadana, R., Thiyagarajan, J. A., & Boker, S. M. (2020).
Entropy fit indices: New fit measures for assessing the structure and dimensionality of multiple latent variables.
Multivariate Behavioral Research.
# Load data
wmt <- wmt2[,7:24]
# Estimate correlation matrix
correlation.matrix <- auto.correlate(wmt)
# Estimate network
network <- EBICglasso.qgraph(data = wmt)
# Compute standard Louvain with highest modularity approach
community.consensus(
network,
consensus.method = "highest_modularity"
)
# Compute standard Louvain with iterative (original) approach
community.consensus(
network,
consensus.method = "iterative"
)
# Compute standard Louvain with most common approach
community.consensus(
network,
consensus.method = "most_common"
)
# Compute standard Louvain with lowest TEFI approach
community.consensus(
network,
consensus.method = "lowest_tefi",
correlation.matrix = correlation.matrix
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.