The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Generate a Random Number (New Number With Each Instance)

roman_toblerroman_tobler Member Posts: 2 Learner III
edited 2018 10 in Help

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

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    @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. 

  • roman_toblerroman_tobler Member Posts: 2 Learner III

    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

Sign In or Register to comment.