Parameter optimization loop within another loop

Hello everyone. I am trying to develop a workflow in which several MLP(Multilayer Perceptrons) models are sequentially cross-validated on different datasets of the same size. I want to optimize the parameters(neurons,layers) at each iteration of the chunk loop node, which will divide my original table in smaller datasets of the same size. I tried to use a parameter optimization loop in order to do so but it does not seem to work inside another loop. I am sharing my workflow, in which I actually placed the parameter optimization loop outside of the chunk loop start, which is incorrect) here for easier visualization. Are you able to find a solution? In the end I should get a table with all of the best parameter combinations for each cross-validated model. Thanks in advance.

Parameters_Optimization_CV.knwf (51.3 KB)

Hi @matt0

It is a little bit difficult to see where it went wrong, because there is no (sample) data in the flow. But I think you have to reorder your loop nodes. See:


Hope this helps, gr Hans

3 Likes

Thanks @HansS. I tried it but, unfortunately, it did not work. However, I managed to find a solution by playing a little bit with the flow variable edges.

3 Likes

What are the score results in comparison to directly running it in python? BR

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