Select by Random
Hello RM community,
I encountered a strange problem with the operator "Seleect by Random". I use it to select 1 attribute out of a set of various. I want to randomly select 1 attribute and process it. So I set the number of attributes to 1 and check "Use local random seed". I use Loop Parameter to iteratively change the local random seed.
Strangely, always the same attribute is selected. How can I manage to make RM select 1 RANDOM attribute in a loop?
I can provide an example code if needed.
Cheers,
Markus
I encountered a strange problem with the operator "Seleect by Random". I use it to select 1 attribute out of a set of various. I want to randomly select 1 attribute and process it. So I set the number of attributes to 1 and check "Use local random seed". I use Loop Parameter to iteratively change the local random seed.
Strangely, always the same attribute is selected. How can I manage to make RM select 1 RANDOM attribute in a loop?
I can provide an example code if needed.
Cheers,
Markus
0
Answers
I never used this operator before so I just tested it Β
In my case it seems that always only the last attribute is selected (tested it with "Generate Data" and 100 attributes). Changing the local random seed or deactivating the use of a local random seed doesn't change anything. If I select more than one attribute all the others vary depending on the seed value. But the last attribute is always present. Seems like a little bug in the operator to me...
Regards
Matthias
yes, you are right. Knowing this I could build a workaround:
I selected 2 attributes and removed the 2nd one (which is the first chosen one).
However, I hope that the operator can be fixed for the next versions.
Cheers,
Markus
right, there was a "-1" added to the maximum index to be deleted, causing the last attribute to be never deleted. Thanks for the hint, I fixed this.
Greetings,
Sebastian