Saving all models when using X-Partitioner

Hi @DataDudes and welcome to the KNIME forum!

One way to save the models within a loop is to convert them at every iteration into an object using the “PMML to Cell” node:

or the “Model to Cell” node:

Once a model is in cell format, you could add it into an extra column which is fed with a new model at every new loop iteration. Once all the iterations are finished, you should have a column with all the models saved. All these models can thus later be saved as a KNIME table using the table writer node:

You could at any time, read this table with your stored models using the Table Reader node:

And at this stage, using a new loop, convert them again into PMML format using the cell to PMML node:

or the Cell to Model node:

and finally execute them with their associated predictor. This procedure works for most of the models, regardless of the algorithm you are using to generate the model (here XGBoost Tree Ensemble Learner).

Here below a possible implementation:

B.t.w. this is just a possible solution, but there are a few others …

Hope this helps.

Best

Ael