Icon

20210629 Pikairos Saving all models when using X-Partitioner

20210628 Pikairos Saving all models when using X-Partitioner

This workflow shows how to combine a -X-Partitioner- node to a -Loop End- node to individually gather scoring information and models from the different Cross Validation iterations.

This workflow brings a possible answer to the question asked by @DataDudes in post #34198 of the KNIME forum.

Partitionyour Data Setfor a 10-CVTrain oncurrent iterationPredict on currenti-Test setStore the currenti model into a cellCalculateScorings oncurrenti-Test SetSet new columnwith RowIDcontentSet new columnwith RowIDcontentSet RowIDcolumn firstSet RowIDcolumn first Save current modelin fileknime://knime.workflow/_LOCAL_DATA/iris_model_(i)This is controlled by a variable Generate anew name for everymodel at everyiterationSet a columnwith the local path tothe current model fileLoop overthe K-fold resultsand gather them+ ModelsLoad irisdataSave all Modelsat OnceX-Partitioner XGBoost TreeEnsemble Learner XGBoost Predictor Model to Cell Scorer RowID RowID Column Resorter Column Resorter Model Writer(deprecated) Java EditVariable (simple) Variable to TableRow (deprecated) Column Appender Loop End Table Reader Table Writer Partitionyour Data Setfor a 10-CVTrain oncurrent iterationPredict on currenti-Test setStore the currenti model into a cellCalculateScorings oncurrenti-Test SetSet new columnwith RowIDcontentSet new columnwith RowIDcontentSet RowIDcolumn firstSet RowIDcolumn first Save current modelin fileknime://knime.workflow/_LOCAL_DATA/iris_model_(i)This is controlled by a variable Generate anew name for everymodel at everyiterationSet a columnwith the local path tothe current model fileLoop overthe K-fold resultsand gather them+ ModelsLoad irisdataSave all Modelsat OnceX-Partitioner XGBoost TreeEnsemble Learner XGBoost Predictor Model to Cell Scorer RowID RowID Column Resorter Column Resorter Model Writer(deprecated) Java EditVariable (simple) Variable to TableRow (deprecated) Column Appender Loop End Table Reader Table Writer

Nodes

Extensions

Links