use of org.knime.base.node.mine.treeensemble2.model.AbstractTreeNodeSurrogateCondition in project knime-core by knime.
the class ConditionExporter method exportCondition.
void exportCondition(final TreeNodeCondition condition, final Node pmmlNode) {
if (condition instanceof TreeNodeTrueCondition) {
pmmlNode.addNewTrue();
} else if (condition instanceof TreeNodeColumnCondition) {
final TreeNodeColumnCondition colCondition = (TreeNodeColumnCondition) condition;
exportColumnCondition(colCondition, pmmlNode);
} else if (condition instanceof AbstractTreeNodeSurrogateCondition) {
final AbstractTreeNodeSurrogateCondition surrogateCond = (AbstractTreeNodeSurrogateCondition) condition;
setValuesFromPMMLCompoundPredicate(pmmlNode.addNewCompoundPredicate(), surrogateCond.toPMMLPredicate());
} else {
throw new IllegalStateException("Unsupported condition (not implemented): " + condition.getClass().getSimpleName());
}
}
Aggregations