vtraag / leidenalg

Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python.
GNU General Public License v3.0
566 stars 76 forks source link

Get different result after upgrading to 0.10.1 #157

Closed tanliwei-coder closed 6 months ago

tanliwei-coder commented 7 months ago

When I upgrade leidenalg from 0.8.10 to 0.10.1, I get a different result despite I use the same input data and same input parameters.

I used the parameters as below: partition_type = leidenalg.RBConfigurationVertexPartition n_iterations = -1 seed = 0 resolution_parameter = 1 weights were got from an igraph object created with Neighbors Connectivities which were calculated by input data, I have checked the both input weights are the same.

Could anybody tell me why or how to keep the result stable?

vtraag commented 6 months ago

There were some changes between these two versions that affect the results of the clustering. For that reason, it is not possible to ensure the results remain identical. If you absolutely insist the results remain identical, you are forced to stick to the 0.8 series.

tanliwei-coder commented 6 months ago

@vtraag

Got it, thanks for replying.