use of org.knime.base.node.mine.treeensemble2.data.TreeNumericColumnMetaData in project knime-core by knime.
the class LiteralConditionParser method handleSimplePredicate.
private TreeNodeColumnCondition handleSimplePredicate(final SimplePredicate simplePred, final boolean acceptsMissings) {
String field = simplePred.getField();
if (m_metaDataMapper.isNominal(field)) {
NominalAttributeColumnHelper colHelper = m_metaDataMapper.getNominalColumnHelper(field);
return new TreeNodeNominalCondition(colHelper.getMetaData(), colHelper.getRepresentation(simplePred.getValue()).getAssignedInteger(), acceptsMissings);
} else {
TreeNumericColumnMetaData metaData = m_metaDataMapper.getNumericColumnHelper(field).getMetaData();
double value = Double.parseDouble(simplePred.getValue());
return new TreeNodeNumericCondition(metaData, value, parseNumericOperator(simplePred.getOperator()), acceptsMissings);
}
}
Aggregations