Problems using PMML Model Appender node in combination with Table to PMML Ensemble one

Hi Guys,

I have a problem with the PMML model appender node while I'm trying to create a PMML ensemble model and export it using a standard workflow as described in:

https://www.knime.org/blog/pmml-integration-in-knime

The sequence of nodes is the following:

Empty PMML creator → PMML Model Appender → PMML writer

and the model to append is an ensemble PMML model. 

As you can see in the attached workflow, if I write a PMML ensemble from the Table to PMML Ensemble node it is correctly extracted. Nevertheless if I try to write it after I use the PMML Model Appender node it gives me the following error and the model cannot be exported:

 

ERROR PMMLValidator : Expected element 'DataField' before the end of the content in element DataDictionary

ERROR PMML Writer 0:1100 Invalid PMML document found. Errors: : Expected element 'DataField' before the end of the content in element DataDictionary

ERROR PMML Writer 0:1100 Execute failed: Invalid PMML document found. Errors: : Expected element 'DataField' before the end of the content in element DataDictionary

Is the PMML Model Appender node not compatible with the Table to PMML Ensemble one? Do I am missing something?

Thanks in advance,

Gio

Hi again,

Finally I found the problem, it was due to my misunderstanding. When the modular PMML nodes are used, the PMML Transformation Appender node must always be used, even if no transformation is realized on data, because it provide DataFields to the PMML document. The corrected sequence of node to use is shown in the attached workflow.

Cheers,

Gio

 

Hi Gio,

but you are right, we should give a warning message there.

I will check with our pmml guru if he can catch this.

Cheers, Iris

Perfect. Thank you Iris!

Well, that help me a great deal (after spending hours to no avail). 

Summarizing, you have to use the Tansformation Appender, with the top node input coming from the Empty PMML Creator, and the bottom node input coming from a Normalizer (PMML) block.  In the Normalizer block, you move all of your data columns to the left under "Do Not Normalize";  so it's a kind of null operator.

Even so, I cannot get any of the "Copyright" and "Description" options to show up in the final PMML file (neither do they show up in Gio's example).  They are either being ignored, or they are being overwritten somewhere.