[Gephi-plugins] Weighted modularity

Xavier Snelgrove xs at wxs.ca
Fri May 13 23:44:53 CEST 2011


Hi all,

I'm looking at using the Modularity plugin to find communities in a fully-connected graph in which edge weights vary. Unfortunately, although the Lefebvre algorithm as originally published works on weighted graphs, the implementation in Gephi does not (it assumes all edges have weight 1).

I would like to fix this, and can do so. I have checked out a bzr branch and can make the changes there. I'm wondering if this a change that you would be interested in including in the main Modularity module. If so I will try to build it in a way that fits your project layout.

Does the following make sense?

	- Add a checkbox "use weights" to the UI for the modularity statistic.
	- Implement a method of HierarchicalGraph called getSumOfWeights(Node n) which sums the edge-weights of all edges connected to a node
	- Edit modularity so that if "use weights" is checked, places where getTotalDegree() is used now, getSumOfWeights() is used instead.

Thanks,
	Xavier Snelgrove



More information about the gephi-plugins mailing list