Repository navigation
Add Leiden algorithm file - #5964
juanis2112 wants to merge 3 commits into
Conversation
dschult
left a comment
There was a problem hiding this comment.
You will need to update the __init__.py file in networkx/algorithms/community to import the new leiden.py module. That will get rid of a bunch of the errors.
If the functions are exactly the same, you should import them from the Louvain module and call them in this module.
I think the two new functions should be in the same file/module. They are so dependent on each other it will be easier to read them together.
Nice!
|
Thanks Dan! I will update the init.py for now to avoid some of the errors. I think I wasn't clear about my question. I meant keeping louvain and leiden in separate files since I will be using the auxiliary functions for both of them. But I think you've answered it already. We'll keep them separately as it is right now. |
|
@juanis2112 Thanks for the PR! Do you still have interest and bandwidth to work on this? No worries if not :) |
|
Hi @MridulS I'd love to finish this work. It'll take me some time to pick it up from when it was so if you prefer to close the PR, I can start a new one too. |
|
Great! Feel free to open a new one when the time comes :) |
This is a work in progress of the Leiden's algorithm implementation.
I've included a new Leiden.py file with the algorithm implementation (which is not complete yet) which is basically a copy of the Louvain's file but with the relevant changes for Leiden.
Up until now:
I'm missing:
A couple of questions for @dschult:
I'll keep working on the refinement phase and upload some code soon.