Search in sources :

Example 6 with PMMLOperator

use of org.knime.base.node.mine.decisiontree2.PMMLOperator in project knime-core by knime.

the class FromDecisionTreeNodeModel method setOperator.

/**
 * Sets the operator of {@code pred} based on the properties of {@code simple.}
 *
 * @param pred An xml {@link SimplePredicate}.
 * @param simple A {@link PMMLSimplePredicate}.
 */
private void setOperator(final SimplePredicate pred, final PMMLSimplePredicate simple) {
    PMMLOperator x = simple.getOperator();
    Enum e = PMMLPredicateTranslator.getOperator(x);
    if (e == null) {
        throw new UnsupportedOperationException("Unknown operator: " + x);
    }
    pred.setOperator(e);
}
Also used : Enum(org.dmg.pmml.SimplePredicateDocument.SimplePredicate.Operator.Enum) PMMLOperator(org.knime.base.node.mine.decisiontree2.PMMLOperator)

Aggregations

PMMLOperator (org.knime.base.node.mine.decisiontree2.PMMLOperator)6 Operator (org.dmg.pmml.SimplePredicateDocument.SimplePredicate.Operator)2 Enum (org.dmg.pmml.SimplePredicateDocument.SimplePredicate.Operator.Enum)2 Enum (org.dmg.pmml.SimpleSetPredicateDocument.SimpleSetPredicate.BooleanOperator.Enum)2 PMMLBooleanOperator (org.knime.base.node.mine.decisiontree2.PMMLBooleanOperator)2 PMMLSetOperator (org.knime.base.node.mine.decisiontree2.PMMLSetOperator)2 PMMLSimplePredicate (org.knime.base.node.mine.decisiontree2.PMMLSimplePredicate)2 PMMLCompoundPredicate (org.knime.base.node.mine.decisiontree2.PMMLCompoundPredicate)1