Find community structure that minimizes the expected description length of a random walker trajectory. If the graph is directed, edge directions will be taken into account.
cluster_infomap(
graph,
e.weights = NULL,
v.weights = NULL,
nb.trials = 10,
modularity = TRUE
)
The input graph. Edge directions will be taken into account.
If not NULL
, then a numeric vector of edge weights.
The length must match the number of edges in the graph. By default the
‘weight
’ edge attribute is used as weights. If it is not
present, then all edges are considered to have the same weight.
Larger edge weights correspond to stronger connections.
If not NULL
, then a numeric vector of vertex
weights. The length must match the number of vertices in the graph. By
default the ‘weight
’ vertex attribute is used as weights. If
it is not present, then all vertices are considered to have the same weight.
A larger vertex weight means a larger probability that the random surfer
jumps to that vertex.
The number of attempts to partition the network (can be any integer value equal or larger than 1).
Logical scalar, whether to calculate the modularity score of the detected community structure.
cluster_infomap()
returns a communities()
object,
please see the communities()
manual page for details.
Please see the details of this method in the references given below.
The original paper: M. Rosvall and C. T. Bergstrom, Maps of information flow reveal community structure in complex networks, PNAS 105, 1118 (2008) doi:10.1073/pnas.0706851105 , https://arxiv.org/abs/0707.0609
A more detailed paper: M. Rosvall, D. Axelsson, and C. T. Bergstrom, The map equation, Eur. Phys. J. Special Topics 178, 13 (2009). doi:10.1140/epjst/e2010-01179-1 , https://arxiv.org/abs/0906.1405.
Other community finding methods and communities()
.
Community detection
as_membership()
,
cluster_edge_betweenness()
,
cluster_fast_greedy()
,
cluster_fluid_communities()
,
cluster_label_prop()
,
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()
## Zachary's karate club
g <- make_graph("Zachary")
imc <- cluster_infomap(g)
membership(imc)
#> [1] 1 1 1 1 2 2 2 1 3 1 2 1 1 1 3 3 2 1 3 1 3 1 3 3 3 3 3 3 3 3 3 3 3 3
communities(imc)
#> $`1`
#> [1] 1 2 3 4 8 10 12 13 14 18 20 22
#>
#> $`2`
#> [1] 5 6 7 11 17
#>
#> $`3`
#> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34
#>