netneurolab / netneurotools

Useful tools from the Network Neuroscience Lab
https://netneurolab.github.io/netneurotools
BSD 3-Clause "New" or "Revised" License
61 stars 32 forks source link

Add option to use Leiden algorithm in modularity.consensus_modularity() #44

Open rmarkello opened 5 years ago

rmarkello commented 5 years ago

The issue

The Louvain algorithm has some known deficiencies that can lead to badly connected (i.e., singleton or disconnected) communities. This is undesirable in many instances and can require using "bad" gamma settings when performing consensus community detection on certain networks to avoid such communities.

Proposed solution

The newly implemented Leiden algorithm proposes a solution to this issue of badly connected communities with the Louvain algorithm. Adding a parameter to the modularity.consensus_modularity() function to optionally use the Leiden algorithm would be awesome. Note, however, that the linked implementation is licensed under the GPL-3.0, so integrating it directly into netneurotools may not be desirable.