Modularity value range

🚨 This page is a work in progress.

πŸ•‘ TL;DR: Modularity .

Going through the examples, you may have wondered what a β€œgood” or β€œbad” modularity value really is. Here, we will discuss the value range of the modularity measure.

Modularity is zero if the fraction of edges within communities is no different from the respective fraction we would expect in a random graph. We get a positive value if this fraction is higher than expected on the basis of chance. This directly results from our definition of modularity. In the simple network presented here, was around which is still slightly better than at random but nevertheless worse than the best result of for that particular graph.

Upper limit

In theory, the maximum possible modularity value is for a graph with infinitely many communities, such that . We show this property for a graph with communities, each forming a graph, i. e. two vertices sharing one edge.

Graph for upper limit of modularity
Infinite graph and community assignment yielding the upper limit of modularity:

This graph has communities as well as edges. When approaches infinity, we obtain:

As and for every graph partitioning, is indeed the upper limit of modularity.

Lower limit

The lower limit of modularity is which is achieved using any bipartite graph with the clustering (see here), that is, each cluster encompasses all the vertices of one bipartition of (the vertex sets or respectively ). The following figure shows the bipartite graph with , and . The given community assignment yields a modularity of , while the maximum modularity for this particular graph is .

Graph for lower limit of modularity
Bipartite graph and community assignment yielding the lower limit of modularity:

Common values

A rigorous proof that holds true for any undirected and unweighted graph and any community assignment (clustering) is presented here. Note however, that for a given graph, the maximum achievable modularity is oftentimes not . Newman and Girvan claim that a typical range for modularity values is from to (see here) with values above indicating a β€œsignificant community structure in a network” (see here). Whether values above really indicate a good community structure depends on the application and the particular graph.