`random_state` must be a RandomState instance
See original GitHub issueThis is a private function, so it’s maybe not a big deal, but I wanted to point out that the parameter random_state
to _k_init() must be a RandomState instance, it can not be an integer. So, the documentation of this parameter is wrong on the docstrings of _k_init().
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
numpy.random.RandomState — NumPy v1.16 Manual
RandomState exposes a number of methods for generating random numbers drawn from a variety of probability distributions. In addition to the distribution- ...
Read more >python - Difference between np.random.seed() and np ...
RandomState () constructs a random number generator. It does not have any effect on the freestanding functions in np.random , but must be ......
Read more >Add RandomState support for the sklearn wrapper · Issue #730
If random_state is a RandomState instance, call get_state() and derive from the returned value (how?) a seed for the c++ code. Ideally we...
Read more >Error: ValueError('%r cannot be used to seed a numpy.random ...
If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If ...
Read more >Why do we set a random state in machine learning models?
You may already use random state in your machine learning models. ... This allows the function to use the global random state instance...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes 👍
On Thu, 2 Jan 2020 at 18:43, Manish Aradwad notifications@github.com wrote:
– Guillaume Lemaitre Scikit-learn @ Inria Foundation https://glemaitre.github.io/
Closing after merging the PR. Thanks for reporting.