Closed massimocallisto closed 6 months ago
Hi @massimocallisto, the error is probably due to some issue with the scipy version installed in your system - which probably differs from the one originally requested by the package.
My suggestion is to use our library dedicated to community detection CDlib instead of this older package that has not been maintained in years.
There you can find algorithms, visualization facilities and also evaluation and comparison functions (even nf1).
Best, Giulio
Hi Giulio, Actually I started from CDlib which actually depends on this package, if I'm right. The same problem happens in that case when running the code below:
from cdlib import evaluation, algorithms
g = nx.karate_club_graph()
louvain_communities = algorithms.louvain(g)
leiden_communities = algorithms.leiden(g)
evaluation.f1(louvain_communities,leiden_communities)
Thanks
Massimo
Hi Massimo, I double checked: the issue is tied to a changed signature (and behavior) of a Scipy method used by NF1.
To avoid cascading effects and dependency version nightmares I just integrated a patched version of NF1 directly in the CDlib master branch (probably I'll release a new version of the package within this week).
Now you should be able to use it without additional issues by installing cdlib with
pip install git+https://github.com/GiulioRossetti/cdlib
Best, Giulio
Dear Giulio, Thank you for the patch. So, I will definitely move to cdlib.
Regards
Massimo
Hi Giulio,
I'm testing the library but an error occurred in the provided example.
I'm using a MackBook Air M2, python 3.10.11 The same error is given in Ubuntu 22.04LTS 64bit Intel, python 3.10.12
Here the installed packages:
The code is the one from the README file:
Thank you
Massimo