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 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.
Authors
- Chinnapong Angsuchotmetee (ORCID: https://orcid.org/0000-0001-9284-4902)
- Kittichai Lavangnananda (ORCID: https://orcid.org/0000-0002-9227-4839)
- TINNAPAT PUNNAPATHIRAN
- P. Kaewkarndee
Institutions
- Prince of Songkla University (TH)
- University of Luxembourg (LU)
- Songkhla Rajabhat University (TH)
Publication Details
- Journal
- SoftwareX
- Published
- 2025-05-24
- DOI
- https://doi.org/10.1016/j.softx.2025.102193
- Citations
- 1
- Primary Topic
- Complex Network Analysis Techniques
- Type
- article
- Field-Weighted Citation Impact
- 1.32
Funders
- King Mongkut's University of Technology Thonburi
- Faculty of Science, Prince of Songkla University