Since then we had new data showing that it was even worse than we thought and far less likely to be aggregating floating point deviations.
Ultimately the issue was because I wrongly assumed that networkx Graph objects would return both edges in an undirected graph (or rather, it would treat it like a directed graph but with an identical/mirror relationship). As such we weren't accumulating values for the destination/target vertex, and our calculations were far, far from what they should have been.
This is now correct and our unit tests show exact parity with the python-louvain library's community.modularity function (unit test has been left to use numpy.testing.assert_almost_equal, but now precision is out to 8 decimal places.)
Closes#47
* Commit of current status prior to actually updating the tests. The current tests are less tests and more an exploration in why our modularity calculation differed from the python-louvai modularity calculation
* Updating tests and documentation
* Wanted to make sure we handled disconnected nodes appropriately
* Added release notes
* Restricting us to the 2.x versions of Sphinx, 3.0 breaks us
Co-authored-by: Dwayne Pryce <dwpryce@microsoft.com>
This commit Closes#35.
We still don't know why the unit test `test_laplacian_embedding_elbowcut_none` fails on the MacOS Github Action instances, but not on any other MacOS system that we've tried.
This fix addresses the issue by effectively ignoring it as we can't reproduce it elsewhere, but it took steps to make the test be skipped only on Github Actions, only when using the .github/workflows/validate_on_push.yml workflow file, and only as long as the SKIP_TEST_35=true environment variable is used when running the test.
This means that developer/user testers of topologic with MacOS will still run this unit test, and we can also create a new branch to disable this flag and continue testing topologic + Github Actions on MacOS in an attempt to see when, or if, this is fixed (since it doesn't seem to be related to us so much as Github's CI instances).
Co-authored-by: Dwayne Pryce <dwpryce@microsoft.com>