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
Is there a way to avoid the loop operator from breaking if there are no records in ExampleSet?
amit_pathak
Member Posts: 7 Learner II
in Help
I am using the Loop Values Operator in my RM process and there are some instances where the input is an empty ExampleSet. Usually what I have seen in programs is that the loop does not throw errors for empty iterators. Can we achieve the same with RM.
The attribute parameter is 'id' and the iteration macro is 'loop_value'.
The attribute parameter is 'id' and the iteration macro is 'loop_value'.
Error Message: Process failed: The minimum number of iterations must not be smaller than 1.
Tagged:
0
Answers
Yes, this is the behaviour of some loops in RapidMiner. It can be annoying.
You can work around this by wrapping the loop in Branch operator with the condition type min_examples = 1.
Regards,
Balázs
I did exactly what you suggested. This annoys me more because no matter whether there are records present or not in the `ExampleSet`, the process flow still goes towards the `Loop` operator. I guess I might be doing something wrong which you want to correct.
As you can see in the below image, for the inputs received by the `Branch` operator I believe it should have not gone toward the `Loop` operator.
You can put the Loop inside the Branch operator.
The Branch operator has two panels. The left one will be executed if the condition evaluates to true (so if the minimum number of examples is 1), the right one in the other case, for an empty dataset.
In your process you might also want to put Append and Remove Duplicates into the Branch.
Regards,
Balázs