taynaud / python-louvain

Louvain Community Detection
BSD 3-Clause "New" or "Revised" License
965 stars 200 forks source link

Add scikit-learn style random_state #30

Closed pavlin-policar closed 6 years ago

pavlin-policar commented 6 years ago

Fixes #29.

randomize now behaves like this:

random_state behaves in exactly the same way as in scikit-learn.

By default, we now produce random result, which is consistent with scikit-learn. Before the default was to return deterministic results.

If you don't like any of this, I can change it, but I don't think any of this is problematic. It's better to be consistent with popular libraries so the API is familiar, and I've added deprecation warnings so users can gradually switch to the new API.

taynaud commented 6 years ago

Sorry it took me a while.

I will try to make a few more checks this week end and do a release.

Thanks!