  Modularity is widely used to effectively measure the strength of the
community structure found by community detection algorithms. However,
modularity maximization suffers from two opposite yet coexisting problems: in
some cases, it tends to favor small communities over large ones while in
others, large communities over small ones. The latter tendency is known in the
literature as the resolution limit problem. To address them, we propose to
modify modularity by subtracting from it the fraction of edges connecting nodes
of different communities and by including community density into modularity. We
refer to the modified metric as Modularity Density and we demonstrate that it
indeed resolves both problems mentioned above. We describe the motivation for
introducing this metric by using intuitively clear and simple examples. We also
prove that this new metric solves the resolution limit problem. Finally, we
discuss the results of applying this metric, modularity, and several other
popular community quality metrics to two real dynamic networks. The results
imply that Modularity Density is consistent with all the community quality
measurements but not modularity, which suggests that Modularity Density is an
improved measurement of the community quality compared to modularity.
