Difference between Matlab and Octave in random seeding
Bateman David-ADB014
David.Bateman at motorola.com
Fri Mar 7 08:44:41 CST 2008
The change that was made results in separate seeds for the rand, rand, rande, randg and rande generators.. The other generators in the statistics toolbox rely on these five intrinsic generators and so will of cause now be seeded differently.
However, I'm not sure I see the need for seeding in a parallel situation being any different from the normal case. The programmer needs to be aware of the change in both cases.
BTW, the old generators had/have seperate seeds, and the change makes the behavior of seeding with 'state' or 'seed' similar.
-----Original Message-----
From: michael.creel at gmail.com on behalf of Michael Creel
Sent: Fri 07-Mar-08 9:27 AM
To: John W. Eaton
Cc: bug-octave at octave.org
Subject: Re: Difference between Matlab and Octave in random seeding
On Thu, Mar 6, 2008 at 6:49 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On 5-Mar-2008, Michael Creel wrote:
>
> | On this issue, I vote for having the seed set in a single spot for all
> RNGs.
> | This facilitates greatly parallel use of Octave. Sometimes it's
> important to
> | be able to reset the seed, and it's a lot less likely to screw up if
> only
> | one needs to be reset.
>
> I guess I'm missing something because I don't see how having separate
> states for rand and randn has anything to do with parallelism.
>
> jwe
It doesn't have any intrinsic effect, of course, but from the point of view
of ease of programming and likelihood of making hard to detect errors, it is
not neutral. If RNG has its own seed, then the programmer must control the
value of that seed on each node. If two RNGs that originally share a seed
become endowed with separate seeds in a new version of Octave, the
programmer must be aware of this. If he or she is not, the code will
continue to run, but with bogus results. If we're only talking about having
one or two seeds for uniform and normal, it's not that big of a deal. But if
RNGs for other distributions also go this route, it will be an
inconvenience. Basically, I find that the current situation with one seed
for all RNGs is ideal. Just my 2 euro cents.
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080307/95c2ef58/attachment.html
More information about the Bug-octave
mailing list