[Numpy-discussion] [Scikit-learn-general] random number generator, entropy and pickling

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Apr 25 14:28:13 EDT 2011


On Mon, Apr 25, 2011 at 01:23:12PM -0500, Robert Kern wrote:
> > Yes, that's exactly why we want the different objects to able to recieve
> > their own PRNG.

> But seriously, they are running A+B, the combination of A and B. If
> A+B changes to A+B', then the results may be different. That's to be
> expected.

Fair enough. Let's say the example was not ideal, but we still want to be
able to control the random number generation of an algorithm
independently of what's going on elsewhere. That's why we are happy to be
able to have a PNRG dedicated to that processing pipeline. I think that
everybody agrees with that.

> > The use case that we are trying to catter for, with the global PRNG, is
> > for mister Joe average, who is used to setting the numpy PRNG to control
> > what is going on.

> Honestly, they really shouldn't be, except as a workaround to
> poorly-written functions that don't let you pass in your own PRNG.

Right, but many users transit from Matlab, where they learn this pattern.
I am not interested in fighting against user's behavior unless I have a
very good reason. What they do in their code is their problem.

G



More information about the NumPy-Discussion mailing list