- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Add Random Seed to prediction formula
I would like make a reproducible simulation formula by adding a the same random number to a prediction formula .Guess this is possible with Random seed? I olnly find a very brief explanation in JMP help; how to add this random seed to a formula?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
If you can't add that random value column to the table which students are using, I think you could use Random Reset(Row()) (you can change the Row() to something else, but it should still be Row() dependent and not randomized, so Row()*Row() or Row() + 10 are for example fine).
Column 8 just demonstrates the random reset + random normal part
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
I think you might be able to use Random Reset()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
What number should I put between the brackets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
I added seed 1234 to a prediction formula for "Selectivity(%)"
The result is that all the numbers in Selectivity column, for which I created the formula, become dots..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
Random Reset will just set the seed, you will still need to use something else to add the number (number will be same for each of the rows due to having same seed)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
Sorry I don't undestand, Random Lev? How to add a random number to my formula?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
I have no idea what type of number you are adding, pick your number creation option and use that (there are a lot of those in JMP). One option is Random Integer().
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(10),
Compress File When Saved(1),
New Column("Column 1",
Numeric,
"Continuous",
Formula(Random Integer(1, 10))
)
);
Edit:
And if you wish to have same number on each of the rows (and not use Reset Seed()) As Constant should work (I think it is re-evaluated when formula is)
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(10),
Compress File When Saved(1),
New Column("Column 1",
Numeric,
"Continuous",
Formula(
AsConstant(Random Integer(1, 10)))
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
Hi @frankderuyck,
If I understand your need, you would like to create a Y response matching a specific model (with main effects, interactions, quadratic effects...), but adding some "controlled" noise so that you have a little variability in the response ? So that your response looks more realistic in the context of teaching and less completely deterministic with perfect modeling ?
In that case, the options mentioned by @jthi may help you, adding Random Normal or Random Integer in the response formula.
Here is a formula example I have used for a simulation :
50 + :X3 * 10 + :X2 * 4 + :X2 * :X3 * 2 + :X2 * :X2 * -6 + Random Normal( 0, 2 )
I specified my Y response to have an intercept of 50, I added some terms in the model for thisresponse equation, and at the end, I added random normal noise, of mean 0 and standard deviation of 2.
Note that if I replay this Y column (open up, click on the formula without changing anything and then closing the window), numbers may change as the formula will be reevaluated. One option to avoid this is to check "Supress Eval", so that the formula will be fixed with the specified random normal noise :
If you talk about the modeling, you won't have any reproducibility issue using multivariate regression or some other models, but for some Machine Learning models, you have the option to specify the seed for analysis reproducibility (here an example of analyzing a Y response with Bootstap Forest specifying a random seed 12345 so that relaunching the analysis/script will give the exact same results) :
I hope this answer will help you,
"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
Dear @jthi and Victor, thanks for useful inputs, however think I need to better clarify my question. Teaching DOE I let students/trainees generate a DOE and to add the experimental results they have to copy column properties of a column with simulated results i.e. a formula + a random number. In order to make sure that analysis is reproducible the experimental results have to be the same for everyone in the class room. As an example I attached a file with a 3 factor CCD and a formula simulating the experimental Selectivity results of a chemical reaction. How to make sure that all three students 1, 2 and 3 get the same Selectity results when copying column properties of this formula? How to keep the random number fixed across all thee student columns? Hope this is suffi, iently clear now, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add Random Seed to prediction formula
forgot attachemnt..