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

allow seeding of init methods in vq.kmeans2 #9450

Closed
rgommers opened this issue Nov 7, 2018 · 0 comments · Fixed by #13972
Closed

allow seeding of init methods in vq.kmeans2 #9450

rgommers opened this issue Nov 7, 2018 · 0 comments · Fixed by #13972
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.cluster
Milestone

Comments

@rgommers
Copy link
Member

rgommers commented Nov 7, 2018

The vq.kmeans2 function has initialization methods (that can be selected by the minit keyword) that do random number generation without allowing for seeding. See e.g. #9037 (review)

It should be possible for the user to pass in a np.random.RandomState instance or set a seed, rather than having to rely on setting the global state. Can be done in a similar way as the random_state keyword in the stats distributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.cluster
Projects
None yet
2 participants