[scikit-learn] NEP: Random Number Generator Policy

Robert Kern robert.kern at gmail.com
Thu Jun 7 14:50:16 EDT 2018


https://mail.python.org/pipermail/numpy-discussion/2018-June/078126.html

Hi, sklearners!

I have a NEP out for discussion that proposes a change in numpy.random's 
stream-compatibility policy. As scikit-learn is a well-disciplined consumer of 
reproducible streams, I would appreciate your input on the numpy-discussion 
thread linked above.

The very short form is that there is a new PRNG subsystem being developed with 
better core PRNGs (among other things, providing nice features like independent 
streams for parallel computations), and we would like to relax our strict 
stream-compatibility policy for the non-uniform distributions in this new 
subsystem so that we can improve our algorithms. The core uniform numbers would 
still be strictly stream-compatible across numpy versions. But we would like to 
be able to upgrade our non-uniform algorithms, for example, to make normal 
variates faster to generate.

RandomState would be frozen and subject to a long deprecation cycle for a period 
of strict backwards compatibility. There would be some non-deprecated provision 
to get strictly-compatible streams for a subset of distributions for the limited 
purpose of generating test data for unit tests.

Please read the NEP and the thread through. I do propose at least one 
alternative in the thread and would like some feedback on it. I would also 
appreciate it if we could consolidate the discussion on the numpy-discussion 
thread and not have a split-off conversation here too.

Thank you very much! I appreciate your attention.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the scikit-learn mailing list