2010/2/7 Gábor Csárdi
<address@hidden>
Dear Avril,
here are a bunch of examples on how get membership vectors for the
various community finding algorithms. The partitioning with the
maximal modularity score is chosen for the methods that return a full
merge tree.
memberships <- list()
pause()
### edge.betweenness.community
ebc <- edge.betweenness.community(G)
mods <- sapply(0:ecount(G), function(i) {
g2 <- delete.edges(G, ebc$removed.edges[seq(length=i)])
cl <- clusters(G)$membership
modularity(G, cl)
})
???
cl <- clusters(g2)$membership
modularity(g2,cl)
???
g2 <- delete.edges(G, ebc$removed.edges[1:(which.max(mods)-1)])
memberships$`Edge betweenness` <- clusters(g2)$membership