View source: R/get_partitions.R
get_partitions | R Documentation |
get_partitions
)The get_partitions
function is a wrapper to gather a collection of community detection partitions using igraph's cluster_leiden
for maximizing modularity at various resolution parameter values, along with the routines called by the comm_detect
function, to gather different partitions for subsequent input to the CHAMP
code for post-processing partitions to identify domains of modularity optimization.
get_partitions(
network,
gamma_range = c(0, 3),
n_runs = 100,
n_iterations = 2,
seed = NULL,
add_comm_detect = TRUE
)
network |
The network, as igraph object, to be clustered into communities. Only undirected networks are currently supported. If the object has a 'weight' edge attribute, then that attribute will be used. |
gamma_range |
The range of the resolution parameter gamma (default from 0 to 4). |
n_runs |
The number of |
n_iterations |
Parameter to be passed to cluster_leiden (default = 2). |
seed |
Optional random seed for reproducing pseudo-random results. |
add_comm_detect |
Boolean to decide whether to also call the clustering algorithms included in |
get_partitions
returns a list of unique partitions appropriate for subsequent input to CHAMP
.
Peter J. Mucha (peter.j.mucha@dartmouth.edu), Alex Craig, Rachel Matthew, Sydney Rosenbaum and Ava Scharfstein
# Use get_partitions to generate multiple partitions of the
# Zachary karate club at different resolution parameters
data(karate, package = "igraphdata")
partitions <- get_partitions(karate, n_runs = 2500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.