Book Image

Gephi Cookbook

Book Image

Gephi Cookbook

Overview of this book

Table of Contents (18 chapters)
Gephi Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Finding a graph's modularity


The modularity of a graph is a measure of its strength and describes how easily the graph could be disintegrated into communities, modules, or clusters. In this recipe, the concept of modularity, along with its implementation in Gephi, is described.

How to do it…

To obtain the modularity score for a graph, follow these steps:

  1. Load the Les Misérables graph in Gephi.

  2. In the Network Overview tab under the Statistics panel, hit the Run button adjacent to Modularity.

  3. In the Modularity settings window, enter a resolution in the textbox depending on whether you want a small or large number of communities:

    You can choose to randomize to get a better decomposition of the graph into communities, but this increases the computation time.

    You can also choose to include edge weight in computing modularity.

  4. Hit OK once done.

  5. This opens up the Modularity Report window, which the size distribution of communities into various modularity classes. The report also shows the number of communities...