igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Re: your spinglass.community function in the R igraph libr


From: Yannick Rochat
Subject: Re: [igraph] Re: your spinglass.community function in the R igraph library
Date: Thu, 4 Mar 2010 22:25:55 +0100

Gábor, correct me if I'm wrong, but in the following code, shouldn't you be using g2 instead of G in the function ?

Best,

Yannick



---------------------------------------------------------------
Yannick Rochat - IMA - Université de Lausanne
http://www.unil.ch/unisciences/YannickRochat


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


reply via email to

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