use of org.dmg.pmml.PMMLDocument in project knime-core by knime.
the class PMMLClusteringModelWrapper method createPMMLDocument.
/**
* {@inheritDoc}
*/
@Override
public PMMLDocument createPMMLDocument(final DataDictionary dataDict) {
PMMLDocument doc = createEmptyDocument(dataDict);
doc.getPMML().setClusteringModelArray(new ClusteringModel[] { m_model });
return doc;
}
use of org.dmg.pmml.PMMLDocument in project knime-core by knime.
the class PMMLMiningModelWrapper method createPMMLDocument.
/**
* {@inheritDoc}
*/
@Override
public PMMLDocument createPMMLDocument(final DataDictionary dataDict) {
PMMLDocument doc = createEmptyDocument(dataDict);
doc.getPMML().setMiningModelArray(new MiningModel[] { m_model });
return doc;
}
use of org.dmg.pmml.PMMLDocument in project knime-core by knime.
the class PMMLModelWrapper method createEmptyDocument.
/**
* creates an empty document.
*
* @param dataDict the data dictionary.
* @return a empty pmml document
*/
protected static PMMLDocument createEmptyDocument(final DataDictionary dataDict) {
PMMLDocument pmmlDoc = PMMLDocument.Factory.newInstance(PMMLFormatter.getOptions());
PMML pmml = pmmlDoc.addNewPMML();
pmml.setVersion(PMMLPortObject.PMML_V4_2);
if (dataDict == null) {
pmml.addNewDataDictionary();
} else {
pmml.setDataDictionary(dataDict);
}
PMMLPortObjectSpec.writeHeader(pmml);
return pmmlDoc;
}
use of org.dmg.pmml.PMMLDocument in project knime-core by knime.
the class PMMLNeuralNetworkWrapper method createPMMLDocument.
/**
* {@inheritDoc}
*/
@Override
public PMMLDocument createPMMLDocument(final DataDictionary dataDict) {
PMMLDocument doc = createEmptyDocument(dataDict);
doc.getPMML().setNeuralNetworkArray(new NeuralNetwork[] { m_model });
return doc;
}
use of org.dmg.pmml.PMMLDocument in project knime-core by knime.
the class PMMLSupportVectorMachineModelWrapper method createPMMLDocument.
/**
* {@inheritDoc}
*/
@Override
public PMMLDocument createPMMLDocument(final DataDictionary dataDict) {
PMMLDocument doc = createEmptyDocument(dataDict);
doc.getPMML().setSupportVectorMachineModelArray(new SupportVectorMachineModel[] { m_model });
return doc;
}
Aggregations