injecting additional flow variables into parameter optimisation loop end node does not appear to be possible


In classification applications, the best parameter set often translates into: best model under the constraint of least complexity. One such parameter selection strategy is known as "one SE": e.g. for a bag of words model, the number of terms in the dictionary would be such a complexity parameter; the lower the number of terms, the less complex the model.

The strategy would consist in 1) identifying those parameter value sets for which the objective function value is in the range of one standard error of the value of the highest performing model, then 2) selecting the least complex parameter set among the eligible models. In lucky cases such k-nn or decision trees, the parameter values themselves are good indicators of complexity. However, in other cases (such as bag of words), the parameter optimisation loop end node would have to allow the injection of additional flow variables than only the parameter values and the objective function value.

So far, I've come up with the following ideas to circumvent this limitation:

  • Solution 1: 
    • Output the complexity value into a .csv file during the loop by appending each row as the loop moves on.
    • After the loop, fetch the file and join it with the optimisation node output.
  • Solution 2:
    • abandon the use of the optimisation nodes;
    • build a parameter table with Table Creator and Cross Joiner;
    • loop over the table without any limitation regarding the output;

Solution 1 requires to purge the content of the said csv file before each optimisation wave and to clean up at the end of the workflow. Solution 2 kind of misses the point of the optimisation nodes but it is probably a good alternative in the short run.

Are there any other alternatives ?

In the long run, would it be possible to enhance the optimisation nodes in such a way as to allow the injection of additional flow variables?



Hi Geo,

At present, the two solutions you have come up with are the only way to do this. However, I have opened an enhancement request that should alow you to pass flow variables into the loop.



Thank you Roland!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.