Skip Iteration if Examples in Loop Subset <n

OprickOprick Member Posts: 19 Contributor II
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.


Best Answer

  • OprickOprick Posts: 19 Contributor II
    Solution Accepted
    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,


  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,213   Unicorn
    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.
    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.