igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Qualifying individual communities


From: A. Gerow
Subject: [igraph] Qualifying individual communities
Date: Tue, 4 Feb 2014 14:37:42 -0600

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]