Creating new Learner and Predictor Nodes.


What are the steps in creating new Learner and predictor nodes.

I also need to create a PMML xml with custom attributes.



If your model will be PMML, you are lucky, just create the nodes with the node wizard and change the default constructor call to super to the array of PortTypes and override the configure/execute methods with PortObjectSpec/PortObject array arguments, return types.

The generated classes for PMML help you create the PMML model with custom attributes.

Hth, gabor

Hi ,

I have created the nodes just the way you have suggested.

But i want to add some attributes in the NumericPredictor document which i believe is present in the schema , which is used by the PMMLPortObject,PMMLTranslator and PMMLSpec.

Is there a way to add attribute to the NumericPredictor.


I think the org.dmg.pmml.NumericPredictorDocument.NumericPredictor.setExtensionArray(Extension[]) method would help there. The page explains the purpose of Extensions. I think it fits your usecase.

Cheers, gabor

Hey Gabor,

That is how it is done :)

Thanks for the help...