| community_spinglass | R Documentation |
Statistical mechanics approach using simulated annealing. Can handle negative edge weights.
community_spinglass(
x,
weights = NULL,
vertex = NULL,
spins = 25,
parupdate = FALSE,
start.temp = 1,
stop.temp = 0.01,
cool.fact = 0.99,
update.rule = c("config", "random", "simple"),
gamma = 1,
implementation = c("orig", "neg"),
gamma.minus = 1,
seed = NULL,
...
)
com_sg(
x,
weights = NULL,
vertex = NULL,
spins = 25,
parupdate = FALSE,
start.temp = 1,
stop.temp = 0.01,
cool.fact = 0.99,
update.rule = c("config", "random", "simple"),
gamma = 1,
implementation = c("orig", "neg"),
gamma.minus = 1,
seed = NULL,
...
)
x |
Network input |
weights |
Edge weights. NULL uses network weights, NA for unweighted. |
vertex |
Vertex to find community for (single community mode). NULL for full partitioning. |
spins |
Number of spins (maximum communities). Default 25. |
parupdate |
Parallel update mode. Default FALSE. |
start.temp |
Starting temperature. Default 1. |
stop.temp |
Stopping temperature. Default 0.01. |
cool.fact |
Cooling factor. Default 0.99. |
update.rule |
Update rule: "config" (default), "random", or "simple". |
gamma |
Gamma parameter for modularity. Default 1. |
implementation |
"orig" (default) or "neg" (for negative weights). |
gamma.minus |
Gamma for negative weights in "neg" implementation. |
seed |
Random seed for reproducibility. Default NULL. |
... |
Additional arguments passed to |
A cograph_communities object
A cograph_communities object. See detect_communities.
Reichardt, J., & Bornholdt, S. (2006). Statistical mechanics of community detection. Physical Review E, 74, 016110.
g <- igraph::make_graph("Zachary")
comm <- community_spinglass(g)
igraph::membership(comm)
net <- as_cograph(matrix(runif(25), 5, 5))
com_sg(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.