vtraag / louvain-igraph

Implementation of the Louvain algorithm for community detection with various methods for use with igraph in python.
GNU General Public License v3.0
246 stars 46 forks source link

Can I get the number of output partitions customly? #31

Closed moorejee closed 6 years ago

moorejee commented 6 years ago

Hi, vtraag: Thanks for your works. I have a little question that i just get three partitions about my data. So, I want to change the number of clustering output of the louvain methods. Is there any setting I can change to make this work?

vtraag commented 6 years ago

You cannot change immediately the number of clusters itself. However, you can change a so-called resolution parameter. A higher resolution parameter results in more (smaller) communities and a lower resolution parameter results in less (larger) communities. See http://louvain-igraph.readthedocs.io/en/latest/intro.html for more information. The RBConfigurationVertexPartition is the same as ModularityVertexPartition but having such a resolution parameter.