|
From: | Gábor Csárdi |
Subject: | Re: [igraph] Qualifying individual communities |
Date: | Tue, 4 Feb 2014 16:30:37 -0500 |
Greetings -
After computing a set of communities, using a multi-cut algorithm like infomap.community(), I understand it computes the modularity of the best (highest modularity) community. How can I calculate this for individual communities (ie. not just the best)?
In my example, I'd like to run something like this:
g <- graph.from.somewhere
comms <- infomap.community(g,modularity=T,nb.trials=30)
solution_modularity <- modularity(comms)
# The biggest communities:
for (comm in names(sort(sizes(comms),decreasing=T)[0:20])) {
g2 <- induced.subgraph(g, which(membership(comms) == comm))
### Need to compute the modularity of comm or g2 here ###
Any ideas?- Aaron
--
A. Gerow
Knowledge Lab | Computation Institute
University of Chicago
5735 South Ellis Avenue
Chicago, IL 60637 - USA
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |