leidenalg
leidenalg copied to clipboard
avoid random result randomness in find_partition
as many clustering algorithms, find_partition is giving diff results over multiple executions of same input. I'm trying to stablize this and have fixed results of same input. I have tried the seed parameter, but didn't work for me. Is there a way to reach this? (have same results for same input)
Similar question as mine.
Sorry for the late reply!
Could you perhaps include some code that demonstrates the problem for you?
If I run
part1 = la.find_partition(G, la.ModularityVertexPartition, seed=0)
part2 = la.find_partition(G, la.ModularityVertexPartition, seed=0)
then part1.membership == part2.membership, in other words, I get identical partition, even for random graphs G.