Setting random_state and np.random.seed does not ensure reproducibility
See original GitHub issueI think it would be great and make things a lot easier, if there would be a top level API for scikit-learn
scikit-learn.set_random_seed
This would help a lot for reproducibility as one would not have to remember setting random states for each algorithm that is called. This has to deal with multiprocessing though I guess.
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (13 by maintainers)
Top Results From Across the Web
How to get absolutely reproducible results with Scikit Learn?
I just was playing with numpy and as well with sklearn . Apparently, setting np.random.seed does not guarantee a fixed random state for ......
Read more >Stop Using NumPy's Global Random Seed - Built In
Using np.random.seed(number) has been a best practice when using NumPy to create reproducible work. Setting the random seed means that your ...
Read more >Random Seeds and Reproducibility - Towards Data Science
In pure Python, you use random.seed() to set the seed, and then you may use random.randint() to draw ... Who said ensuring reproducibility...
Read more >Properly Setting the Random Seed in ML Experiments. Not as ...
The good news is that by carefully setting the random seed across your pipeline you can achieve reproducibility. The “seed” is a starting...
Read more >Good practices with numpy random number generators
random.seed function. Fixing the seed at the beginning ensures that the script is reproducible: the same values and results will be produced ......
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 FreeTop 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
Top GitHub Comments
I’m asking, because right now I have problems with reproducibility. I set the np.random.seed as well as each algorithms random state, however the results are still a bit different each time a run the scripts.
This looks like a multiprocessing issue. When I run this with
n_jobs=1
It seems that I always get the same result.