- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
What is the valid range of random seed?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: What is the valid range of random seed?
Hi @vince_faller,
At first, I thought it would be something on the order of 1 to (2^19937)-1, because that's the period of the Mersenne Twister generator JMP uses. But, though some trial and error I discovered it seems to be somewhere in the neighborhood of 1 to a 64bit integer. Below is a script where I fit two neural models with the seed set, and around 9,223,372,036,854,775,295 is where I cross over to the seed not actually being set (i.e., the models don't match since the holdout sets differ). Interestingly it's not always right at 9223372036854775295 that things break down. Sometimes it's 9223372036854775295+1, sometimes it's 9223372036854775295 + 1000. I'm confused by that, and I'm sorry I don't have an explanation for why; hopefully, someone else will!
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
seed = 9223372036854775295; //works, i.e., same results for validation
//seed = 9223372036854775295 + 1000; //does not work
Neural(
Y( :sex ), X( :height, :weight ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 ),
Set Random Seed( seed ),
Fit( NTanH( 3 ) )
);
Neural(
Y( :sex ), X( :height, :weight ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 ),
Set Random Seed( seed ),
Fit( NTanH( 3 ) )
);
I hope this helps a bit!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: What is the valid range of random seed?
It looks like the internal generator uses integers from 1 to (2^32)-1 for the reset value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: What is the valid range of random seed?
Hi @vince_faller,
At first, I thought it would be something on the order of 1 to (2^19937)-1, because that's the period of the Mersenne Twister generator JMP uses. But, though some trial and error I discovered it seems to be somewhere in the neighborhood of 1 to a 64bit integer. Below is a script where I fit two neural models with the seed set, and around 9,223,372,036,854,775,295 is where I cross over to the seed not actually being set (i.e., the models don't match since the holdout sets differ). Interestingly it's not always right at 9223372036854775295 that things break down. Sometimes it's 9223372036854775295+1, sometimes it's 9223372036854775295 + 1000. I'm confused by that, and I'm sorry I don't have an explanation for why; hopefully, someone else will!
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
seed = 9223372036854775295; //works, i.e., same results for validation
//seed = 9223372036854775295 + 1000; //does not work
Neural(
Y( :sex ), X( :height, :weight ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 ),
Set Random Seed( seed ),
Fit( NTanH( 3 ) )
);
Neural(
Y( :sex ), X( :height, :weight ),
Informative Missing( 0 ),
Validation Method( "Holdback", 0.3333 ),
Set Random Seed( seed ),
Fit( NTanH( 3 ) )
);
I hope this helps a bit!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: What is the valid range of random seed?
It looks like the internal generator uses integers from 1 to (2^32)-1 for the reset value.