Skip to content
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

Still in development? #6

Closed
furlat opened this issue Jan 25, 2024 · 4 comments
Closed

Still in development? #6

furlat opened this issue Jan 25, 2024 · 4 comments

Comments

@furlat
Copy link

furlat commented Jan 25, 2024

HI, I am long time lover of genlovauin since the old matlab wrapper. I am currently working with Polars dataframes and my data often have a graph representation via vectorization and neighborhood construction, I would be very interested in using this crate if it is still under development.

@Splines
Copy link
Owner

Splines commented Jan 25, 2024

Hi @furlat, thanks for contacting me ;) Never heard about Polars, but cool that you have data you want to use with Louvain.

I'm currently studying physics, so unfortunately my time is rather limited. However, I've written my computer science bachelor thesis partially about the Louvain algorithm and do really like it. I've also created a whole video explainer discussing where the modularity formula comes from and how Louvain works (see also the docs). I've made this repo primarily for the mentioned video but had in mind to keep improving my Rust implementation.

I've not yet come up with a stable CLI interface. You might still want to try it out and see if it works for you. In the future, there might be breaking changes, but those won't probably matter too much as the CLI as of today is very simple and limited (pass in a file with your data, get a file back etc.). Some features like stopping the program once the modularity delta is below a small threshold are implemented, but not available as command line flag. But you might just change the respective parameter in the source code. Other than that, the implementation itself is feature-complete and I've also written quite a few tests. I've also put in efforts towards "Clean architecture" patterns as you can see in the modules folder. Must things should also be documented but there's of course room for improvement.

Note that my implementation is close to the original C++ one and should yield the same results. However, the achieved modularity is not directly comparable to that of networkX as they use a slightly different definition of a vertex degree (see also the respective remark in the description of the YouTube video). Just that you are aware of this. I found out about this too late to have it in the video. Maybe in the future, I will change the definition used here as well to conform with networkx as their definition absolutely makes sense, see e.g. here.

So, in summary: yes, I plan to work on this repo again, but I cannot promise at which point in time this will happen as I'm quite busy with other projects and my physics studies right now, which are my priority for right now. Hopefully, I will find some time again between my semesters, e.g. in March this year. We'll see...

@Splines
Copy link
Owner

Splines commented Jan 25, 2024

If you feel like giving my code a try, feel free to open new issues here if you encounter any errors or weird situations. Please include a detailed description then and in the best case data to reproduce.

@furlat
Copy link
Author

furlat commented Jan 25, 2024

Fantastic thanks for the response, Polars is a rust dataframe library with python bindings that has a super good multithread orchestrator and it allows to easily integrate operations from other rust packages. There is a trend of using it to orchestrate parallel rust operations on large dataset from python without getting GIL locked.

Good luck with your studies, and I will definitely check the code especially if you finish the repo :)

@Splines
Copy link
Owner

Splines commented Jan 25, 2024

Oh nice, definitely something I will look into. And I just remembered Python bindings were on my wish list when I first started this repo ;)

@Splines Splines closed this as completed Jan 25, 2024
@Splines Splines pinned this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants