Search in sources :

Example 6 with PMMLDocument

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;
}
Also used : PMMLDocument(org.dmg.pmml.PMMLDocument)

Example 7 with PMMLDocument

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;
}
Also used : PMMLDocument(org.dmg.pmml.PMMLDocument)

Example 8 with PMMLDocument

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;
}
Also used : PMML(org.dmg.pmml.PMMLDocument.PMML) PMMLDocument(org.dmg.pmml.PMMLDocument)

Example 9 with PMMLDocument

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;
}
Also used : PMMLDocument(org.dmg.pmml.PMMLDocument)

Example 10 with PMMLDocument

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;
}
Also used : PMMLDocument(org.dmg.pmml.PMMLDocument)

Aggregations

PMMLDocument (org.dmg.pmml.PMMLDocument)19 PMML (org.dmg.pmml.PMMLDocument.PMML)7 PMMLPortObject (org.knime.core.node.port.pmml.PMMLPortObject)6 ColumnRearranger (org.knime.core.data.container.ColumnRearranger)5 RuleSet (org.dmg.pmml.RuleSetDocument.RuleSet)4 RuleSetModel (org.dmg.pmml.RuleSetModelDocument.RuleSetModel)4 DataRow (org.knime.core.data.DataRow)3 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)3 PortObject (org.knime.core.node.port.PortObject)3 Document (org.w3c.dom.Document)3 IOException (java.io.IOException)2 BigInteger (java.math.BigInteger)2 ParseException (java.text.ParseException)2 ArrayList (java.util.ArrayList)2 XmlException (org.apache.xmlbeans.XmlException)2 XmlObject (org.apache.xmlbeans.XmlObject)2 DataCell (org.knime.core.data.DataCell)2 DataColumnSpecCreator (org.knime.core.data.DataColumnSpecCreator)2 DataTableSpec (org.knime.core.data.DataTableSpec)2 StringValue (org.knime.core.data.StringValue)2