[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Modularity on the igraph_community_spinglass()
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Modularity on the igraph_community_spinglass() |
Date: |
Thu, 21 Mar 2013 22:04:52 +0100 |
Hi,
> I have a doubt about the modularity function implemented on the
> igraph_community_spinglass() function for weighted graphs. It is normalized
> on the number of edges or the sum of edge weights?
It is normalized on the sum of edge weights. If you have the source code of
igraph, look around in pottsmodel_2.cpp around line 1227.
> I got some negative values, like -2, for some graphs.
> Is it correct? On the unweighted case the modularity varys between -1 to 1.
> But on the weighted generalization I think that it is not true.
Actually, the unweighted modularity is between -0.5 and 1, not between -1 and
1. I don't know whether this applies to the weighted modularity as well, but
note that the modularity function of the spinglass clustering is eqivalent to
the modularity of Newman if and only if the gamma parameter is 1. I don't know
what gamma parameter you use, but if it is different from 1, then that might be
the reason.
--
T.