-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add something like n_init
to Leiden
#757
Comments
if this issue isn't resolved by the summer, I'm potentially interested in doing the implementation in Rust, I've been interested in learning some Rust for awhile now |
cool, depends on @dwaynepryce 's thoughts I think tho. Ideally, I'd like to have this sooner, esp. since the code would be so simple in python, and I'm using this for a few things in my work. And I don't mind making a PR that is basically the one above. @loftusa could still do it in rust later though, as I think this would avoid repeatedly converting the data into whatever format rust is using, which I suspect would help performance significantly for large networks. |
I'm wondering at the utility of this over the iterations currently in the function? As it is, it'll go until your q score doesn't get any better, then return. If you want it to try again, just set iterations==25 (for instance) and it'll use the latest best partitioning and keep trying another 24 times or so. If the randomization aspect can find a better mapping, it keeps going. This isn't exactly the same as your code, that starts from scratch each time, so let me know if that's the specific behavior you want! |
I believe start from scratch is explicitly what I want - there's some variance in the modularity of the final partition even when using the |
But if you think I'm wrong about the above, would be happy to discuss more, I could show you a demo |
Nope! You're absolutely right.
This should be in the graspologic-native tracker though. We absolutely would want to push this into rust itself just to minimize the native representation -> python representation processes, which aren't free |
closed by #790 |
Is your feature request related to a problem? Please describe.
I often re-run Leiden multiple times and take the best modularity partition.
This is distinct from what the
extra_forced_iterations
parameter does, as far as I can tell.Describe the solution you'd like
I have code that basically looks like:
so basically wrapping the current code in a for loop and adding a parameter.
Describe alternatives you've considered
Might be faster to do this implementation-wise at the Rust level, but I don't have a desire to do that.
Additional context
Happy to open a PR if this is acceptable. cc @dwaynepryce but feel free to @ anyone on the MSR side who might have opinions.
The text was updated successfully, but these errors were encountered: