Defined in File Modularity.hpp
public NetworKit::QualityMeasure
(Class QualityMeasure)
Modularity is a quality index for community detection. It assigns a quality value in [-0.5, 1.0] to a partition of a graph which is higher for more modular networks and partitions which better capture the modular structure.
Modularity is defined as:
$$mod(\zeta) := \frac{\sum_{C \in \zeta} \sum_{ e \in E(C) } \omega(e)}{\sum_{e \in E} \omega(e)} \frac{ \sum_{C \in \zeta}( \sum_{v \in C} \omega(v) )^2 }{4( \sum_{e \in E} \omega(e) )^2 }$$
Public Functions
Default constructor
Returns the Modularity of the given clustering with respect to the graph G.
zeta – The clustering.
G – The graph.
The modularity.
totalEdgeWeight – Sum of all edge weights in G. If specified, it does not have to be computed.