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

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.DecisionTreeNodeSplitContinuous
All Implemented Interfaces:
Serializable, TreeNode

Deprecated.

@Deprecated
public class DecisionTreeNodeSplitContinuous
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
DecisionTreeNodeSplitContinuous()
          Deprecated. Empty Constructor visible only within package.
DecisionTreeNodeSplitContinuous(int nodeId, DataCell majorityClass, LinkedHashMap<DataCell,Double> classCounts, String splitAttribute, DecisionTreeNode[] children, double splitThreshold)
          Deprecated. Constructor of base class.
DecisionTreeNodeSplitContinuous(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.
 String getStringSummary()
          Deprecated. 
 double getThreshold()
          Deprecated. Returns the split threshold of this continuous split.
 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

DecisionTreeNodeSplitContinuous

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


DecisionTreeNodeSplitContinuous

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

DecisionTreeNodeSplitContinuous

public DecisionTreeNodeSplitContinuous(int nodeId,
                                       DataCell majorityClass,
                                       LinkedHashMap<DataCell,Double> classCounts,
                                       String splitAttribute,
                                       DecisionTreeNode[] children,
                                       double splitThreshold)
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
children - the children of this decission tree node
splitThreshold - the split point of the given split attribute that partitions the data of this node
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. For the continuous split we need to analyze the attribute for this split and then ask the left resp. right subtree for it's prediction. Whoever calls us was nice enough to already pick out the DataCell used for this split so we do not need to find it. It is also guaranteed that it is not missing and of the right type.

Specified by:
getClassCounts in class DecisionTreeNodeSplit
Parameters:
cell - the cell to be used for the split at this level
row - input pattern
spec - the corresponding table spec
Returns:
HashMap class/count
Throws:
Exception - if something went wrong (unknown attribute 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. This node simply forwards this request to the appropriate child.

Specified by:
addCoveredPattern 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 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 attribute 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

getThreshold

public double getThreshold()
Deprecated. 
Returns the split threshold of this continuous split.

Returns:
the split threshold of this continuous split


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.