Package weka.classifiers.trees.ht
Class SplitNode
java.lang.Object
weka.classifiers.trees.ht.HNode
weka.classifiers.trees.ht.SplitNode
- All Implemented Interfaces:
Serializable
Class for a node that splits the data in a Hoeffding tree
- Version:
- $Revision: 10169 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Field Summary
Fields inherited from class weka.classifiers.trees.ht.HNode
m_classDistribution -
Constructor Summary
ConstructorsConstructorDescriptionSplitNode(Map<String, WeightMass> classDistrib, Split split) Construct a new SplitNode -
Method Summary
Modifier and TypeMethodDescriptionbranchForInstance(Instance inst) Return the branch that the supplied instance goes downvoidgraphTree(StringBuffer buff) intinstallNodeNums(int nodeNum) booleanisLeaf()Returns true if this is a leafleafForInstance(Instance inst, SplitNode parent, String parentBranch) Return the leaf that the supplied instance ends up atintNumber of child nodesvoidAdd a childvoidupdateNode(Instance inst) Update the node with the supplied instanceMethods inherited from class weka.classifiers.trees.ht.HNode
classDistributionIsPure, getDistribution, numEntriesInClassDistribution, toString, totalWeight, updateDistribution
-
Constructor Details
-
SplitNode
Construct a new SplitNode- Parameters:
classDistrib- the class distributionsplit- the split
-
-
Method Details
-
branchForInstance
Return the branch that the supplied instance goes down- Parameters:
inst- the instance to find the branch for- Returns:
- the branch that the supplied instance goes down
-
isLeaf
public boolean isLeaf()Description copied from class:HNodeReturns true if this is a leaf -
numChildred
public int numChildred()Number of child nodes- Returns:
- the number of child nodes
-
setChild
Add a child- Parameters:
branch- the branch for the childchild- the child itself
-
leafForInstance
Description copied from class:HNodeReturn the leaf that the supplied instance ends up at- Overrides:
leafForInstancein classHNode- Parameters:
inst- the instance to find the leaf forparent- the parent nodeparentBranch- the parent branch- Returns:
- the leaf that the supplied instance ends up at
-
updateNode
Description copied from class:HNodeUpdate the node with the supplied instance- Specified by:
updateNodein classHNode- Parameters:
inst- the instance to update with
-
installNodeNums
public int installNodeNums(int nodeNum) - Overrides:
installNodeNumsin classHNode
-
graphTree
-