Search in sources :

Example 1 with TreeNominalColumnMetaData

use of org.knime.base.node.mine.treeensemble.data.TreeNominalColumnMetaData in project knime-core by knime.

the class NominalSplitCandidate method getChildConditions.

/**
 * {@inheritDoc}
 */
@Override
public TreeNodeCondition[] getChildConditions() {
    TreeNominalColumnMetaData columnMeta = getColumnData().getMetaData();
    NominalValueRepresentation[] values = columnMeta.getValues();
    List<TreeNodeCondition> resultList = new ArrayList<TreeNodeCondition>(values.length);
    for (int i = 0; i < values.length; i++) {
        if (m_sumWeightsAttributes[i] >= TreeColumnData.EPSILON) {
            resultList.add(new TreeNodeNominalCondition(columnMeta, i));
        }
    }
    return resultList.toArray(new TreeNodeCondition[resultList.size()]);
}
Also used : TreeNominalColumnMetaData(org.knime.base.node.mine.treeensemble.data.TreeNominalColumnMetaData) TreeNodeNominalCondition(org.knime.base.node.mine.treeensemble.model.TreeNodeNominalCondition) ArrayList(java.util.ArrayList) NominalValueRepresentation(org.knime.base.node.mine.treeensemble.data.NominalValueRepresentation) TreeNodeCondition(org.knime.base.node.mine.treeensemble.model.TreeNodeCondition)

Aggregations

ArrayList (java.util.ArrayList)1 NominalValueRepresentation (org.knime.base.node.mine.treeensemble.data.NominalValueRepresentation)1 TreeNominalColumnMetaData (org.knime.base.node.mine.treeensemble.data.TreeNominalColumnMetaData)1 TreeNodeCondition (org.knime.base.node.mine.treeensemble.model.TreeNodeCondition)1 TreeNodeNominalCondition (org.knime.base.node.mine.treeensemble.model.TreeNodeNominalCondition)1