compare 2 performance values and branch process if one better than the other
I am trying a combined Forward Selection / Backward Elimination approach for Feature Selection, currently, I want to branch and continue into forward Selection, if the performance from the previous backward selection gave no better performance results than the forward selection. otherwise, if it got better with backward selection, I want to continue backward selection until performance gets worse than the best currently backward selection performance.
How can I branch the process, based on some performance condition?
here is my process:
I know I would of course put the whole process into the branch subprocess, but this is only for testing / concept purposes to get better understanding what I mean
and furthermore, I would like to know if I can do this in kind of a loop style, e.g feed into forward selecion the results from the previous backward selection, or if I would have to
use multiple forward / backward selections in a row, e.g 5 of them If I want to do it 5 times...
or is it possible in a loop like I said, and then define some aborting condition, e.g after 5 loops of if performance does not increase anymore...