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

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
All Implemented Interfaces:
Serializable, TreeNode
Direct Known Subclasses:
DecisionTreeNodeSplitNominalBinary

Deprecated.

@Deprecated
public class DecisionTreeNodeSplitNominal
extends DecisionTreeNodeSplit

Is replaced by the more general DecisionTreeNodeSplitPMML node.

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

Constructor Summary
DecisionTreeNodeSplitNominal()
          Deprecated. Empty Constructor visible only within package.
DecisionTreeNodeSplitNominal(int nodeId, DataCell majorityClass, LinkedHashMap<DataCell,Double> classCounts, String splitAttribute, DataCell[] splitValues, DecisionTreeNode[] children)
          Deprecated. Constructor of base class.
DecisionTreeNodeSplitNominal(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.
 DataCell[] getSplitValues()
          Deprecated. Returns the values array of this nodes split attribute.
 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.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

DecisionTreeNodeSplitNominal

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


DecisionTreeNodeSplitNominal

public DecisionTreeNodeSplitNominal(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

DecisionTreeNodeSplitNominal

public DecisionTreeNodeSplitNominal(int nodeId,
                                    DataCell majorityClass,
                                    LinkedHashMap<DataCell,Double> classCounts,
                                    String splitAttribute,
                                    DataCell[] splitValues,
                                    DecisionTreeNode[] children)
Deprecated. 
Constructor of base class. 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 - the split values used to partition the data
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.

Specified by:
getClassCounts in class DecisionTreeNodeSplit
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.

Specified by:
addCoveredPattern in class DecisionTreeNodeSplit
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. This is a leaf so we will simply add the color to our list.

Specified by:
addCoveredColor in class DecisionTreeNodeSplit
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. 

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

getStringSummary

public String getStringSummary()
Deprecated. 

Specified by:
getStringSummary in class DecisionTreeNode
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 DecisionTreeNodeSplit
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.

Specified by:
saveNodeSplitInternalsToPredParams in class DecisionTreeNodeSplit
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.

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

getSplitValues

public DataCell[] getSplitValues()
Deprecated. 
Returns the values array of this nodes split attribute.

Returns:
the values array of this nodes split attribute


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.