use of org.knime.base.node.mine.treeensemble.model.TreeNodeBitCondition in project knime-core by knime.
the class TreeBitVectorColumnData method updateChildMemberships.
/**
* {@inheritDoc}
*/
@Override
public void updateChildMemberships(final TreeNodeCondition childCondition, final double[] parentMemberships, final double[] childMembershipsToUpdate) {
TreeNodeBitCondition bitCondition = (TreeNodeBitCondition) childCondition;
assert getMetaData().getAttributeName().equals(bitCondition.getColumnMetaData().getAttributeName());
final boolean value = bitCondition.getValue();
for (int i = 0; i < m_length; i++) {
if (m_columnBitSet.get(i) != value) {
childMembershipsToUpdate[i] = 0.0;
} else {
assert childMembershipsToUpdate[i] == parentMemberships[i];
}
}
}
use of org.knime.base.node.mine.treeensemble.model.TreeNodeBitCondition in project knime-core by knime.
the class BitSplitCandidate method getChildConditions.
/**
* {@inheritDoc}
*/
@Override
public TreeNodeCondition[] getChildConditions() {
TreeBitColumnMetaData metaData = getColumnData().getMetaData();
TreeNodeCondition[] result = new TreeNodeCondition[2];
result[0] = new TreeNodeBitCondition(metaData, true);
result[1] = new TreeNodeBitCondition(metaData, false);
return result;
}
Aggregations