cluster_label_prop | R Documentation |
This is a fast, nearly linear time algorithm for detecting community structure in networks. In works by labeling the vertices with unique labels and then updating the labels by majority voting in the neighborhood of the vertex.
cluster_label_prop(
graph,
weights = NULL,
...,
mode = c("out", "in", "all"),
initial = NULL,
fixed = NULL
)
graph |
The input graph. Note that the algorithm wsa originally
defined for undirected graphs. You are advised to set ‘mode’ to
|
weights |
The weights of the edges. It must be a positive numeric vector,
|
... |
These dots are for future extensions and must be empty. |
mode |
Logical, whether to consider edge directions for the label propagation, and if so, in which direction the labels should propagate. Ignored for undirected graphs. "all" means to ignore edge directions (even in directed graphs). "out" means to propagate labels along the natural direction of the edges. "in" means to propagate labels backwards (i.e. from head to tail). |
initial |
The initial state. If |
fixed |
Logical vector denoting which labels are fixed. Of course this makes sense only if you provided an initial state, otherwise this element will be ignored. Also note that vertices without labels cannot be fixed. |
This function implements the community detection method described in: Raghavan, U.N. and Albert, R. and Kumara, S.: Near linear time algorithm to detect community structures in large-scale networks. Phys Rev E 76, 036106. (2007). This version extends the original method by the ability to take edge weights into consideration and also by allowing some labels to be fixed.
From the abstract of the paper: “In our algorithm every node is initialized with a unique label and at every step each node adopts the label that most of its neighbors currently have. In this iterative process densely connected groups of nodes form a consensus on a unique label to form communities.”
cluster_label_prop()
returns a
communities()
object, please see the communities()
manual page for details.
Tamas Nepusz ntamas@gmail.com for the C implementation, Gabor Csardi csardi.gabor@gmail.com for this manual page.
Raghavan, U.N. and Albert, R. and Kumara, S.: Near linear time algorithm to detect community structures in large-scale networks. Phys Rev E 76, 036106. (2007)
communities()
for extracting the actual results.
cluster_fast_greedy()
, cluster_walktrap()
,
cluster_spinglass()
, cluster_louvain()
and
cluster_leiden()
for other community detection methods.
Community detection
as_membership()
,
cluster_edge_betweenness()
,
cluster_fast_greedy()
,
cluster_fluid_communities()
,
cluster_infomap()
,
cluster_leading_eigen()
,
cluster_leiden()
,
cluster_louvain()
,
cluster_optimal()
,
cluster_spinglass()
,
cluster_walktrap()
,
compare()
,
groups()
,
make_clusters()
,
membership()
,
modularity.igraph()
,
plot_dendrogram()
,
split_join_distance()
,
voronoi_cells()
g <- sample_gnp(10, 5 / 10) %du% sample_gnp(9, 5 / 9)
g <- add_edges(g, c(1, 12))
cluster_label_prop(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.