Hi, I used the update rule: IGRAPH_SPINCOMM_UPDATE_CONFIG and the implementation: IGRAPH_SPINCOMM_IMP_ORIG and also the gamma equals to 1.
Is it correct? Is this the generalized Newman modularity for weigthed networks? Can I trust it? Thanks a lot. Guilherme. 2013/3/21 Tamás Nepusz <nta...@gmail.com> > 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. > > > _______________________________________________ > igraph-help mailing list > igraph-help@nongnu.org > https://lists.nongnu.org/mailman/listinfo/igraph-help >
_______________________________________________ igraph-help mailing list igraph-help@nongnu.org https://lists.nongnu.org/mailman/listinfo/igraph-help