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

Significance numerical stability #78

Closed vtraag closed 3 years ago

vtraag commented 3 years ago

Since the fix is #70, it seems that some numerical problems sometimes lead to an infinite loop when using Significance, especially in the Linux i686 build. The current attempts at correcting this in 4165e83a681a12b4efe7f51481be24ddc6ee257e, 5f075b454e5516021df229276c31d3dda9ef306a and 65cf652263b0ccb8e6f88f94d9efc93b94a69d9a. In order to avoid cluttering the master branch, I will attempt to fix this in this branch (which needs to be a PR in order to trigger the CI—although it is convenient for documenting this also).

vtraag commented 3 years ago

The optimiser now takes a slightly larger minimal improvement over the current assignment to a community. That is, an improvement of moving a node to another community needs to be at least 10 times DBL_EPSILON in order to be considered as such.