Search in sources :

Example 11 with TreeModel

use of org.dmg.pmml.TreeModelDocument.TreeModel in project knime-core by knime.

the class AbstractGBTModelImporter method readTreeModel.

private Pair<TreeModelRegression, Map<TreeNodeSignature, Double>> readTreeModel(final Segment segment) {
    GBTRegressionContentParser contentParser = new GBTRegressionContentParser();
    TreeModelImporter<TreeNodeRegression, TreeModelRegression, TreeTargetNumericColumnMetaData> treeImporter = new TreeModelImporter<TreeNodeRegression, TreeModelRegression, TreeTargetNumericColumnMetaData>(m_metaDataMapper, m_conditionParser, m_signatureFactory, contentParser, m_treeFactory);
    TreeModel treeModel = segment.getTreeModel();
    TreeModelRegression tree = treeImporter.importFromPMML(treeModel);
    Map<TreeNodeSignature, Double> coefficientMap = contentParser.getCoefficientMap();
    return new Pair<>(tree, coefficientMap);
}
Also used : TreeModel(org.dmg.pmml.TreeModelDocument.TreeModel) TreeTargetNumericColumnMetaData(org.knime.base.node.mine.treeensemble2.data.TreeTargetNumericColumnMetaData) TreeNodeSignature(org.knime.base.node.mine.treeensemble2.model.TreeNodeSignature) TreeNodeRegression(org.knime.base.node.mine.treeensemble2.model.TreeNodeRegression) TreeModelRegression(org.knime.base.node.mine.treeensemble2.model.TreeModelRegression) Pair(org.knime.core.util.Pair)

Aggregations

TreeModel (org.dmg.pmml.TreeModelDocument.TreeModel)11 PMML (org.dmg.pmml.PMMLDocument.PMML)6 GeneralRegressionModel (org.dmg.pmml.GeneralRegressionModelDocument.GeneralRegressionModel)5 RegressionModel (org.dmg.pmml.RegressionModelDocument.RegressionModel)5 ClusteringModel (org.dmg.pmml.ClusteringModelDocument.ClusteringModel)4 NaiveBayesModel (org.dmg.pmml.NaiveBayesModelDocument.NaiveBayesModel)4 NeuralNetwork (org.dmg.pmml.NeuralNetworkDocument.NeuralNetwork)4 RuleSetModel (org.dmg.pmml.RuleSetModelDocument.RuleSetModel)4 SupportVectorMachineModel (org.dmg.pmml.SupportVectorMachineModelDocument.SupportVectorMachineModel)4 AssociationModel (org.dmg.pmml.AssociationModelDocument.AssociationModel)3 SequenceModel (org.dmg.pmml.SequenceModelDocument.SequenceModel)3 TextModel (org.dmg.pmml.TextModelDocument.TextModel)3 DerivedFieldMapper (org.knime.core.node.port.pmml.preproc.DerivedFieldMapper)3 SchemaType (org.apache.xmlbeans.SchemaType)2 LocalTransformations (org.dmg.pmml.LocalTransformationsDocument.LocalTransformations)2 MiningModel (org.dmg.pmml.MiningModelDocument.MiningModel)2 TimeSeriesModel (org.dmg.pmml.TimeSeriesModelDocument.TimeSeriesModel)2 TransformationDictionary (org.dmg.pmml.TransformationDictionaryDocument.TransformationDictionary)2 TreeModelDocument (org.dmg.pmml.TreeModelDocument)2 HashSet (java.util.HashSet)1