org.knime.base.node.mine.decisiontree2.model
Class DecisionTreeNodeSplitNominalBinary

java.lang.Object
  extended by org.knime.base.node.mine.decisiontree2.model.DecisionTreeNode
      extended by org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplit
          extended by org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplitNominal
              extended by org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplitNominalBinary
All Implemented Interfaces:
Serializable, TreeNode

Deprecated.

@Deprecated
public class DecisionTreeNodeSplitNominalBinary
extends DecisionTreeNodeSplitNominal

Is replaced by the more general DecisionTreeNodeSplitPMML node. Represents a nominal split node that splits subsets of values in a binary manner.

Author:
Christoph Sieb, University of Konstanz
See Also:
Serialized Form

Constructor Summary
DecisionTreeNodeSplitNominalBinary()
          Deprecated. Empty Constructor visible only within package.
DecisionTreeNodeSplitNominalBinary(int nodeId, DataCell majorityClass, LinkedHashMap<DataCell,Double> classCounts, String splitAttribute, DataCell[] splitValues, int[] splitMappingsLeft, int[] splitMappingsRight, DecisionTreeNode[] children)
          Deprecated. Constructor for a nominal split in binary format.
DecisionTreeNodeSplitNominalBinary(Node xmlNode, DataCellStringMapper mapper)
          Deprecated. Constructor of derived class.
 
Method Summary
 void addCoveredColor(DataCell cell, DataRow row, DataTableSpec spec, double weight)
          Deprecated. Add colors for a pattern given as a row of values.
 void addCoveredPattern(DataCell cell, DataRow row, DataTableSpec spec, double weight)
          Deprecated. Add patterns given as a row of values if they fall within a specific node.
 boolean addNodeToTreeDepthFirst(DecisionTreeNode node, int ix)
          Deprecated. Add a new node to the tree structure based on a depth-first indexing strategy.
 Set<RowKey> coveredPattern()
          Deprecated. 
 LinkedHashMap<DataCell,Double> getClassCounts(DataCell cell, DataRow row, DataTableSpec spec)
          Deprecated. Determine class counts for a new pattern given as a row of values.
 List<Integer> getLeftChildIndices()
          Deprecated.  
 List<Integer> getRightChildIndices()
          Deprecated.  
 String getStringSummary()
          Deprecated. 
 void loadNodeSplitInternalsFromPredParams(ModelContentRO pConf)
          Deprecated. Load internal SplitNode settings from a ModelContent object.
 void saveNodeSplitInternalsToPredParams(ModelContentWO pConf)
          Deprecated. save internal SplitNode settings to a ModelContent object.
 
Methods inherited from class org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplitNominal
getSplitValues
 
Methods inherited from class org.knime.base.node.mine.decisiontree2.model.DecisionTreeNodeSplit
addCoveredColor, addCoveredPattern, addNode, children, getAllowsChildren, getChildAt, getChildCount, getChildNodeAt, getChildren, getClassCounts, getCountOfSubtree, getIndex, getMVStrategy, getNodeClassWeights, getNTCStrategy, getSplitAttr, isLeaf, loadNodeInternalsFromPredParams, makeRoomForKids, replaceChild, saveNodeInternalsToPredParams, setChildNodeIndex, setMVStrategy, setNTCStrategy
 
Methods inherited from class org.knime.base.node.mine.decisiontree2.model.DecisionTreeNode
addColorToMap, classifyPattern, coveredColors, createNewNode, createNodeFromPredictorParams, getClassCounts, getCustomData, getEntireClassCount, getMajorityClass, getOverallColorCount, getOwnClassCount, getOwnIndex, getParent, getPrefix, getWinner, loadFromPredictorParams, newColors, resetColorInformation, saveToPredictorParams, setCoveredColors, setCustomData, setParent, setPrefix, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecisionTreeNodeSplitNominalBinary

DecisionTreeNodeSplitNominalBinary()
Deprecated. 
Empty Constructor visible only within package.


DecisionTreeNodeSplitNominalBinary

public DecisionTreeNodeSplitNominalBinary(Node xmlNode,
                                          DataCellStringMapper mapper)
Deprecated. 
Constructor of derived class. Read all type-specific information from XML File.

Parameters:
xmlNode - XML node info
mapper - map translating column names to DataCells and vice versa

DecisionTreeNodeSplitNominalBinary

public DecisionTreeNodeSplitNominalBinary(int nodeId,
                                          DataCell majorityClass,
                                          LinkedHashMap<DataCell,Double> classCounts,
                                          String splitAttribute,
                                          DataCell[] splitValues,
                                          int[] splitMappingsLeft,
                                          int[] splitMappingsRight,
                                          DecisionTreeNode[] children)
Deprecated. 
Constructor for a nominal split in binary format. The necessary data is provided directly in the constructor.

Parameters:
nodeId - the id of this node
majorityClass - the majority class of the records in this node
classCounts - the class distribution of the data in this node
splitAttribute - the attribute name on which to split
splitValues - all nominal split values in the order of their integer mapping
splitMappingsLeft - the integer mapping values for the nominal values that fall into the left partition
splitMappingsRight - the integer mapping values for the nominal values that fall into the right partition
children - the children split according to the split values
Method Detail

getClassCounts

public LinkedHashMap<DataCell,Double> getClassCounts(DataCell cell,
                                                     DataRow row,
                                                     DataTableSpec spec)
                                              throws Exception
Deprecated. 
Determine class counts for a new pattern given as a row of values. Returns a HashMap listing counts for all classes.

Overrides:
getClassCounts in class DecisionTreeNodeSplitNominal
Parameters:
cell - the call to be used for classification at this node
row - input pattern
spec - the corresponding table spec
Returns:
HashMap class/count
Throws:
Exception - if something went wrong (unknown attriubte for example)

addCoveredPattern

public void addCoveredPattern(DataCell cell,
                              DataRow row,
                              DataTableSpec spec,
                              double weight)
                       throws Exception
Deprecated. 
Add patterns given as a row of values if they fall within a specific node. Usually only Leafs will actually hold a list of RowKeys, all intermediate nodes will collect "their" information recursively.

Overrides:
addCoveredPattern in class DecisionTreeNodeSplitNominal
Parameters:
cell - the cell to be used for classification at this node
row - input pattern
spec - the corresponding table spec
weight - the weight of this row (between 0.0 and 1.0)
Throws:
Exception - if something went wrong (unknown attribute for example)

addCoveredColor

public void addCoveredColor(DataCell cell,
                            DataRow row,
                            DataTableSpec spec,
                            double weight)
                     throws Exception
Deprecated. 
Add colors for a pattern given as a row of values.

Overrides:
addCoveredColor in class DecisionTreeNodeSplitNominal
Parameters:
cell - the cell to be used for the split at this level
row - input pattern
spec - the corresponding table spec
weight - the weight of the row (between 0.0 and 1.0)
Throws:
Exception - if something went wrong (unknown attriubte for example)

coveredPattern

public Set<RowKey> coveredPattern()
Deprecated. 

Overrides:
coveredPattern in class DecisionTreeNodeSplitNominal
Returns:
set of data cells which are the row keys that are covered by all nodes of this branch

getStringSummary

public String getStringSummary()
Deprecated. 

Overrides:
getStringSummary in class DecisionTreeNodeSplitNominal
Returns:
string summary of node content (split, leaf info...)

addNodeToTreeDepthFirst

public boolean addNodeToTreeDepthFirst(DecisionTreeNode node,
                                       int ix)
Deprecated. 
Add a new node to the tree structure based on a depth-first indexing strategy.

Overrides:
addNodeToTreeDepthFirst in class DecisionTreeNodeSplitNominal
Parameters:
node - node to be inserted
ix - index of this node in depth first traversal order
Returns:
true only if the node was successfully inserted

saveNodeSplitInternalsToPredParams

public void saveNodeSplitInternalsToPredParams(ModelContentWO pConf)
Deprecated. 
save internal SplitNode settings to a ModelContent object.

Overrides:
saveNodeSplitInternalsToPredParams in class DecisionTreeNodeSplitNominal
Parameters:
pConf - configuration object to save decision tree to

loadNodeSplitInternalsFromPredParams

public void loadNodeSplitInternalsFromPredParams(ModelContentRO pConf)
                                          throws InvalidSettingsException
Deprecated. 
Load internal SplitNode settings from a ModelContent object.

Overrides:
loadNodeSplitInternalsFromPredParams in class DecisionTreeNodeSplitNominal
Parameters:
pConf - configuration object to load decision tree from.
Throws:
InvalidSettingsException - if something goes wrong

getLeftChildIndices

public List<Integer> getLeftChildIndices()
Deprecated. 
Returns:
indices of patterns that fall into child node 0 (left).

getRightChildIndices

public List<Integer> getRightChildIndices()
Deprecated. 
Returns:
indices of patterns that fall into child node 1 (right).


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.