Generate a Random Number (New Number With Each Instance)
Hi there
I'm working on a process that creates two random numbers. The following ways have been tested already:
- I used the "Generate Data" operator and tried to use both the attributes as well the label
- I used the "Generate Attributes" rand()
I got to a positive result with each scenario. My result is showing me two numbers the way I want, alright. However, if I run the process a second time the numbers do not change (no random new number is generated) - the same numbers are the output of every new instance of the process.
What operator or work-around is to be used in order to get new random numbers for each time I run the process anew?
Many thanks in advance!
Roman
Answers
-
@roman_tobler i believe the random number generation is tied to the seed that RapidMiner generates at startup. I would change the seed to generate a different random number sequence.
1 -
Hi Thomas
Many thanks for your answer. The solution was to set the Random Seed as "-1" on the process level (global) and not on the operator itself.
Cheers
Roman
2