help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Same sequence of random number generators than under Matlab?


From: Sergei Steshenko
Subject: Re: Same sequence of random number generators than under Matlab?
Date: Sun, 3 Jun 2012 10:49:41 -0700 (PDT)




----- Original Message -----
> From: Sergei Steshenko <address@hidden>
> To: Mathieu Dubois <address@hidden>; "address@hidden" <address@hidden>
> Cc: 
> Sent: Sunday, June 3, 2012 8:45 PM
> Subject: Re: Same sequence of random number generators than under Matlab?
> 
> 
> 
> 
> 
> ----- Original Message -----
>>  From: Mathieu Dubois <address@hidden>
>>  To: address@hidden
>>  Cc: 
>>  Sent: Sunday, June 3, 2012 5:03 PM
>>  Subject: Same sequence of random number generators than under Matlab?
>> 
>>  Hello,
>> 
>>  I want to comapre the output of the Self-Organinzin Map algorithm under 
> Matlab 
>>  and Octave.
>> 
>>  The algorithm is stochastic because, as in most training algorithm, the 
> data are 
>>  presented inrandom order.
>>  In order to compare as precisely as possible the Matlab and Octave version 
> it 
>>  seems necessary to have the same sequence of random numbers.
>> 
>>  Is there a way to do that?
>> 
>>  I have tried the following:
>>  rand('twister', 10);
>>  s = rand(10, 1);
>>  disp(s);
>>  disp(mean(s));
>>  disp(var(s));
>> 
>>  The sequences are different (but the statistics are close).
>> 
>>  Mathieu
>> 
>> 
> 
> As others have already suggested, generate the sequence in one tool (either 
> Matlab or Octave), store it in a file, and use it in the other tool.
> 
> Regards,
>   Sergei.

In general, regardless of tools, using truly random numbers directly, without 
first storing them is a persistent storage, is methodologically wrong.

Suppose certain random numbers sequence exposes an anomaly.

If the sequence is not stored in some kind of persistent storage, it can't be 
replayed in order to investigate the anomaly.

Regards,
  Sergei.





>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]