communities

0th

Percentile

Common functions supporting community detection algorithms

community.to.membership takes a merge matrix, a typical result of community structure detection algorithms and creates a membership vector by performing a given number of merges in the merge matrix.

Keywords
graphs
Usage
community.to.membership(graph, merges, steps, membership=TRUE, csize=TRUE)
Arguments
graph
The graph to which the merge matrix belongs.
merges
The merge matrix, see e.g. walktrap.community for the exact format.
steps
The number of steps, ie. merges to be performed.
membership
Logical scalar, whether to include the membership vector in the result.
csize
Logical scalar, whether to include the sizes of the communities in the result.
Value

  • A named list with two members:
  • membershipThe membership vector.
  • csizeA numeric vector giving the sizes of the communities.

concept

Community structure

See Also

walktrap.community, edge.betweenness.community, fastgreedy.community, spinglass.community for various community detection methods.

Aliases
  • communities
  • community.to.membership
Examples
g <- graph.full(5) %du% graph.full(5) %du% graph.full(5)
g <- add.edges(g, c(0,5, 0,10, 5, 10))
wtc <- walktrap.community(g)
community.to.membership(g, wtc$merges, steps=12)
Documentation reproduced from package igraph, version 0.5.5-3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.