Skip Iteration if Examples in Loop Subset <n
Oprick
New Altair Community Member
Hi,
I have a process in which uses a loop to cycle through several polynomial examples of an attribute. Inside I have a windowing operation and a time series forecast with neural net.
All ok with that. However some iterations are aborted due to an error that arises due to lack of enough examples for the windowing operation.
I tried to solve this with handle exception. It seemed to me to be the right thing to do try. But in the end I have a collection of subsets with the forecast and original subsets, which cannot be appended because they don't share same attributes (and I also don't want it).
I would like to have something like for example: ignore iteration if examples in subset are <10.
I guess that I shall use Branch... but honestly I'm not being able to do it and I would love to have your help on this. Is it possible to skip an iteration if condition is not met?
Enclosed a mock example of my data source and process.
Regards
I have a process in which uses a loop to cycle through several polynomial examples of an attribute. Inside I have a windowing operation and a time series forecast with neural net.
All ok with that. However some iterations are aborted due to an error that arises due to lack of enough examples for the windowing operation.
I tried to solve this with handle exception. It seemed to me to be the right thing to do try. But in the end I have a collection of subsets with the forecast and original subsets, which cannot be appended because they don't share same attributes (and I also don't want it).
I would like to have something like for example: ignore iteration if examples in subset are <10.
I guess that I shall use Branch... but honestly I'm not being able to do it and I would love to have your help on this. Is it possible to skip an iteration if condition is not met?
Enclosed a mock example of my data source and process.
Regards
0
Best Answer
-
Hi @Telcontar120,
I was able to do it with Branch indeed, but not using Extract Macro. I set min_examples and in the Else container I deployed no stream at all. This simple solution seems to work just fine to me.
Anyway I would like, if not asking too much, to see an example of your approach.
Enclosed my process (same original data source).The best,
Pedro1
Answers
-
I think that you are on the right track with Branch. You may need to use Extract Macro inside the loop first and then define the macro based on the number of examples (one of the presets), and then use Branch either to execute your intended process if that macro is greater than your threshold or just skip it and start the loop again. I'm not at my RapidMiner computer right now but that might be enough direction for you to get it going.1
-
Hi @Telcontar120,
I was able to do it with Branch indeed, but not using Extract Macro. I set min_examples and in the Else container I deployed no stream at all. This simple solution seems to work just fine to me.
Anyway I would like, if not asking too much, to see an example of your approach.
Enclosed my process (same original data source).The best,
Pedro1