Community strucure via short random walks
This function tries to find densely connected subgraphs, also called communities in a graph via random walks. The idea is that short random walks tend to stay in the same community.
walktrap.community(graph, weights = E(graph)$weight, steps = 4, merges = TRUE, modularity = TRUE, membership = TRUE)
- The input graph, edge directions are ignored in directed graphs.
- The edge weights.
- The length of the random walks to perform.
- Logical scalar, whether to include the merge matrix in the result.
- Logical scalar, whether to include the vector of the
modularity scores in the result. If the
membershipargument is true, then it will be always calculated.
- Logical scalar, whether to calculate the membership vector for the split corresponding to the highest modularity value.
This function is the implementation of the Walktrap community finding algorithm, see Pascal Pons, Matthieu Latapy: Computing communities in large networks using random walks, http://arxiv.org/abs/physics/0512106
- Random walk
- Community structure
Pascal Pons, Matthieu Latapy: Computing communities in large networks using random walks, http://arxiv.org/abs/physics/0512106
communities on getting the actual membership vector,
merge matrix, modularity score, etc.
edge.betweenness.community for other community detection
g <- graph.full(5) %du% graph.full(5) %du% graph.full(5) g <- add.edges(g, c(1,6, 1,11, 6, 11)) walktrap.community(g)