Are there implementations of algorithms for community detection in graphs? [closed]
Solution 1:
Community detection algorithms are sometimes part of a library (such as JUNG for java) or a tool (see Gephi). When authors publish a new method, they do sometimes make their code available. For example, the Louvain and Infomap methods.
Side note: Girvan-Newman algorithm is sometimes still used, but it has mostly been replaced by faster and more accurate methods. For a good overview of the topic, I recommend Community detection algorithms: a comparative analysis or the longer Community detection in graphs (103 pages).
Solution 2:
You should have a look at the igraph library:
- 7 community detection algorithms (including those mentionned above):
- Edgebetweenness (Girvan-Newman link centrality-based approach),
- Walktrap (Pons-Latapy random walk-based approach),
- Leading Eigenvectors (Newman's spectral approach),
- Fast Greedy (Clauset et. al modularity optimization),
- Label Propagation (Raghavan et. al),
- Louvain (Blondel et. al, modularity optimization),
- Spinglass (Reichardt-Bornholdt, modularity optimization),
- InfoMap (Rosvall-Bergstrom, compression-based approach).
- Other related functions: process modularity, deal with hierarchical structures, etc.
- Available in R, C and Python
- Open source
To my opinion, the most complete tool for community detection. For more details, also check: What are the differences between community detection algorithms in igraph?