Calculating the Modularity of Partitioning a Network

From Clairlib
Jump to: navigation, search

Modularity is a benefit measure used to quantify the quality of partitioning a network into communities. Good divisions, which have high values of modularity, are those in which there are dense internal connections between the nodes within community but only sparse connections between different communities.

In this tutorial you'll use the utility to calculate the modularity value for the division of the Karate Club into communities as described in the Finding Communities in Networks tutorial. In that tutorial, we got the optimal node labeling written to the Karate.bestComm file.

To use the utility, you'll need to have the Karate Club network in edgelist format. To convert the network from GML format to edgelist format, run --input karate.gml --input-format gml --output karate.el --output-format edgelist

Now, to calculate the modularity of the division of the Karate Club network into communities as specified in Karate.bestComm, run --graph karate.el --partitions Karate.bestComm

The result will be something like,

Personal tools

Main Menu
Clairlib Lab