vtraag / leidenalg

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

Default random seed of find_partition_temporal, not random? #55

Closed maxienbelgica closed 3 years ago

maxienbelgica commented 3 years ago

Hi Vincent, Thanks for the excellent work!

I'm running into a reproducibility issue. I was initially running find_partition_temporal without any seed -- which should use a random seed for each run , thus random results each run. However, I am getting the same results -- at least in the same computer -- so its using an unknown seed, but not randomizing it.

I'm running MacOs 10.15.7 and calling the algorithm in Python 3.7.1.

Do you know what seed it's using? Python3 should be generating a random hash each run...

Thanks!

vtraag commented 3 years ago

Sorry for the late response. I indeed didn't seed the RNG correctly, this should now be addressed. Note that it uses the RNG from igraph. I will push a fix shortly.