Nested cross validation

Hi guys, I want to implement, for education purpose, a nested cross validation, but Knime indicates the following error:
WARN WorkflowManager Unable to merge flow object stacks: Conflicting FlowObjects: <Loop Context (Head 0:16:13, Tail unassigned)> - iteration 0 vs. <Restored Loop Context (Head 0:15, Tail unassigned)> - iteration 0 (loops/scopes not properly nested?)

What am i doing wrong?

Use a wrapped metanode instead for your InnerCV. Don’t forget to manage / configure your flow variables.

gr
Hans

Ok I solved the problem, now i need to collect all best parameters of inner cross validation. Is there a way to collect one row at a time of the first output “parameter optimization loop end”?

The bottom-right output port of the parameter-optimization-loop-end holds all the parameter values and your objective-value. Is that where you are looking for?

No, I want all best parameters for each iteration of inner cross validation. Each best parameter is used to evaluate a model of total K on outer cross validation. https://stats.stackexchange.com/questions/244907/how-to-get-hyper-parameters-in-nested-cross-validation

To my understanding, the question is how to pull the best parameters from the inner CV loop through the outer CV loop end (X-Aggregator). The straightforward approach that comes to mind is to pack the InnerCV output into the table that you feed into outer X-Aggregator (Node 17). Your Inner CV output is a row-vector (a table with a single row). You can simply append these columns to the output of outer predictor (Node 28) using Column Appender (configure it to keep the row ids from the predictor table). In the result there will be many missing values, but then you can simply get optimal parameters from the output of outer X-Aggregator by filtering columns with parameters and dropping rows with missing values

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