igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Walktrap / Community / Modularity


From: Tamás Nepusz
Subject: Re: [igraph] Walktrap / Community / Modularity
Date: Thu, 5 Jul 2012 23:50:16 +0200

Hi, 

> I have a network with approx 9500 vertices. The vertices are labelled from 0 
> upwards. I ran Walktrap.communities and have the membership vector. I then 
> ran Modularity on the walktrap object and a vector was returned the same 
> length as the number of vertices. I therefore assume these are vertex 
> modularity scores.
No, they aren't. Modularity refers to the "quality" of a partition with respect 
to the whole network. The reason why you may be getting a vector is because 
walktrap is a hierarchical clustering method, i.e. it merges pairs of vertices 
or communities progressively, and the modularity vector returns the modularity 
of the partition after _each_ merge. The correlation you see is purely 
artificial: since merging pairs of vertices tends to increase the modularity of 
the partition (when the algorithm is doing its job properly and selects the 
right pair of vertices or communities in each step), the modularity score will 
increase for a long while, then have a peak somewhere (which one may use to 
select where to cut the dendrogram that the walktrap algorithm generates), then 
drop back to zero.

Best,
T.




reply via email to

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