Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-23 Thread Robert Kern
On Mon, May 23, 2016 at 5:41 PM, Chris Barker wrote: > > On Sun, May 22, 2016 at 2:35 AM, Robert Kern wrote: >> >> Well, I mean, engineers want lots of things. I suspect that most engineers *really* just want to call `numpy.random.seed(8675309)` at the start and never explicitly pass around separ

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-23 Thread Chris Barker
On Sun, May 22, 2016 at 2:35 AM, Robert Kern wrote: > > Well, I mean, engineers want lots of things. I suspect that most engineers > *really* just want to call `numpy.random.seed(8675309)` at the start and > never explicitly pass around separate streams. There's an upside to that in > terms of cod

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-22 Thread Robert Kern
On Wed, May 18, 2016 at 7:56 PM, Nathaniel Smith wrote: > > On Wed, May 18, 2016 at 5:07 AM, Robert Kern wrote: > > On Wed, May 18, 2016 at 1:14 AM, Nathaniel Smith wrote: > >> ...anyway, the real reason I'm a bit grumpy is because there are solid > >> engineering reasons why users *want* this

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread Nathaniel Smith
On Wed, May 18, 2016 at 5:07 AM, Robert Kern wrote: > On Wed, May 18, 2016 at 1:14 AM, Nathaniel Smith wrote: >> >> On Tue, May 17, 2016 at 10:41 AM, Robert Kern >> wrote: >> > On Tue, May 17, 2016 at 6:24 PM, Nathaniel Smith wrote: >> >> >> >> On May 17, 2016 1:50 AM, "Robert Kern" wrote: >>

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread Robert Kern
On Wed, May 18, 2016 at 6:20 PM, wrote: > > On Wed, May 18, 2016 at 12:01 PM, Robert Kern wrote: >> >> On Wed, May 18, 2016 at 4:50 PM, Chris Barker wrote: >> >> >> >> > ...anyway, the real reason I'm a bit grumpy is because there are solid >> >> > engineering reasons why users *want* this API,

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread josef.pktd
On Wed, May 18, 2016 at 12:01 PM, Robert Kern wrote: > On Wed, May 18, 2016 at 4:50 PM, Chris Barker > wrote: > >> > >> > ...anyway, the real reason I'm a bit grumpy is because there are solid > >> > engineering reasons why users *want* this API, > > > > Honestly, I am lost in the math -- but li

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread Robert Kern
On Wed, May 18, 2016 at 4:50 PM, Chris Barker wrote: >> >> > ...anyway, the real reason I'm a bit grumpy is because there are solid >> > engineering reasons why users *want* this API, > > Honestly, I am lost in the math -- but like any good engineer, I want to accomplish something anyway :-) I tru

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread Chris Barker
> > > ...anyway, the real reason I'm a bit grumpy is because there are solid > > engineering reasons why users *want* this API, > Honestly, I am lost in the math -- but like any good engineer, I want to accomplish something anyway :-) I trust you guys to get this right -- or at least document what

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-18 Thread Robert Kern
On Wed, May 18, 2016 at 1:14 AM, Nathaniel Smith wrote: > > On Tue, May 17, 2016 at 10:41 AM, Robert Kern wrote: > > On Tue, May 17, 2016 at 6:24 PM, Nathaniel Smith wrote: > >> > >> On May 17, 2016 1:50 AM, "Robert Kern" wrote: > >> > > >> [...] > >> > What you want is a function that returns

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Nathaniel Smith
On Tue, May 17, 2016 at 10:41 AM, Robert Kern wrote: > On Tue, May 17, 2016 at 6:24 PM, Nathaniel Smith wrote: >> >> On May 17, 2016 1:50 AM, "Robert Kern" wrote: >> > >> [...] >> > What you want is a function that returns many RandomState objects that >> > are hopefully spread around the MT1993

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Robert Kern
On Tue, May 17, 2016 at 6:24 PM, Nathaniel Smith wrote: > > On May 17, 2016 1:50 AM, "Robert Kern" wrote: > > > [...] > > What you want is a function that returns many RandomState objects that are hopefully spread around the MT19937 space enough that they are essentially independent (in the absen

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Nathaniel Smith
On May 17, 2016 1:50 AM, "Robert Kern" wrote: > [...] > What you want is a function that returns many RandomState objects that are hopefully spread around the MT19937 space enough that they are essentially independent (in the absence of true jumpahead). The better implementation of such a function

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Eric Moore
On Tue, May 17, 2016 at 9:40 AM, Sturla Molden wrote: > Stephan Hoyer wrote: > > I have recently encountered several use cases for randomly generate > random > > number seeds: > > > > 1. When writing a library of stochastic functions that take a seed as an > > input argument, and some of these f

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Robert Kern
On Tue, May 17, 2016 at 2:40 PM, Sturla Molden wrote: > > Stephan Hoyer wrote: > > I have recently encountered several use cases for randomly generate random > > number seeds: > > > > 1. When writing a library of stochastic functions that take a seed as an > > input argument, and some of these fu

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Sturla Molden
Stephan Hoyer wrote: > I have recently encountered several use cases for randomly generate random > number seeds: > > 1. When writing a library of stochastic functions that take a seed as an > input argument, and some of these functions call multiple other such > stochastic functions. Dask is one

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread josef.pktd
On Tue, May 17, 2016 at 4:49 AM, Robert Kern wrote: > On Tue, May 17, 2016 at 9:09 AM, Stephan Hoyer wrote: > > > > On Tue, May 17, 2016 at 12:18 AM, Robert Kern > wrote: > >> > >> On Tue, May 17, 2016 at 4:54 AM, Stephan Hoyer > wrote: > >> > 1. When writing a library of stochastic functions

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Robert Kern
On Tue, May 17, 2016 at 9:09 AM, Stephan Hoyer wrote: > > On Tue, May 17, 2016 at 12:18 AM, Robert Kern wrote: >> >> On Tue, May 17, 2016 at 4:54 AM, Stephan Hoyer wrote: >> > 1. When writing a library of stochastic functions that take a seed as an input argument, and some of these functions cal

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Stephan Hoyer
On Tue, May 17, 2016 at 12:18 AM, Robert Kern wrote: > On Tue, May 17, 2016 at 4:54 AM, Stephan Hoyer wrote: > > 1. When writing a library of stochastic functions that take a seed as an > input argument, and some of these functions call multiple other such > stochastic functions. Dask is one suc

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-17 Thread Robert Kern
On Tue, May 17, 2016 at 4:54 AM, Stephan Hoyer wrote: > > I have recently encountered several use cases for randomly generate random number seeds: > > 1. When writing a library of stochastic functions that take a seed as an input argument, and some of these functions call multiple other such stoch

Re: [Numpy-discussion] Proposal: numpy.random.random_seed

2016-05-16 Thread Stephan Hoyer
Looking at the dask helper function again reminds me of an important cavaet to this approach, which was pointed out to me by Clark Fitzgerald. If you generate a moderately large number of random seeds in this fashion, you are quite likely to have collisions due to the Birthday Paradox. For example