Search in sources :

Example 1 with TreeNodeBitCondition

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];
        }
    }
}
Also used : TreeNodeBitCondition(org.knime.base.node.mine.treeensemble.model.TreeNodeBitCondition)

Example 2 with TreeNodeBitCondition

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;
}
Also used : TreeBitColumnMetaData(org.knime.base.node.mine.treeensemble.data.TreeBitColumnMetaData) TreeNodeCondition(org.knime.base.node.mine.treeensemble.model.TreeNodeCondition) TreeNodeBitCondition(org.knime.base.node.mine.treeensemble.model.TreeNodeBitCondition)

Aggregations

TreeNodeBitCondition (org.knime.base.node.mine.treeensemble.model.TreeNodeBitCondition)2 TreeBitColumnMetaData (org.knime.base.node.mine.treeensemble.data.TreeBitColumnMetaData)1 TreeNodeCondition (org.knime.base.node.mine.treeensemble.model.TreeNodeCondition)1