CGNLib: A Python library for Girvan–Newman community detection with customizable node-based centrality metrics

CGNLib is a Python library designed to enhance the performance of community detection in networks using the Girvan–Newman algorithm. Traditional implementations of this algorithm typically rely solely on edge betweenness centrality, limiting the potential for optimization. CGNLib overcomes this by t...

Full description

Saved in:
Bibliographic Details
Published inSoftwareX Vol. 31; p. 102193
Main Authors Punnapathiran, T., Angsuchotmetee, C., Kaewkarndee, P., Lavangnananda, K.
Format Journal Article
LanguageEnglish
Published Elsevier B.V 01.09.2025
Elsevier
Subjects
Online AccessGet full text
ISSN2352-7110
2352-7110
DOI10.1016/j.softx.2025.102193

Cover

More Information
Summary:CGNLib is a Python library designed to enhance the performance of community detection in networks using the Girvan–Newman algorithm. Traditional implementations of this algorithm typically rely solely on edge betweenness centrality, limiting the potential for optimization. CGNLib overcomes this by transforming edges into nodes within an in-memory auxiliary graph, enabling the use of any node-centric centrality metric on edges, which is not typically possible. This approach allows researchers to explore a wider range of centrality measures, potentially improving community detection outcomes. Additionally, CGNLib supports community visualization and evaluation through metrics like modularity, conductance and coverage. The included CGNExp wrapper simplifies testing various centrality metrics with minimal code, making CGNLib an invaluable tool for researchers in fields such as social network analysis, biology, and other networked systems.
ISSN:2352-7110
2352-7110
DOI:10.1016/j.softx.2025.102193