public class SplitNode extends HNode
m_classDistribution| Constructor and Description |
|---|
SplitNode(java.util.Map<java.lang.String,WeightMass> classDistrib,
Split split)
Construct a new SplitNode
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
branchForInstance(Instance inst)
Return the branch that the supplied instance goes down
|
void |
graphTree(java.lang.StringBuffer buff) |
int |
installNodeNums(int nodeNum) |
boolean |
isLeaf()
Returns true if this is a leaf
|
LeafNode |
leafForInstance(Instance inst,
SplitNode parent,
java.lang.String parentBranch)
Return the leaf that the supplied instance ends up at
|
int |
numChildred()
Number of child nodes
|
void |
setChild(java.lang.String branch,
HNode child)
Add a child
|
void |
updateNode(Instance inst)
Update the node with the supplied instance
|
classDistributionIsPure, getDistribution, numEntriesInClassDistribution, toString, totalWeight, updateDistributionpublic SplitNode(java.util.Map<java.lang.String,WeightMass> classDistrib, Split split)
classDistrib - the class distributionsplit - the splitpublic java.lang.String branchForInstance(Instance inst)
inst - the instance to find the branch forpublic boolean isLeaf()
HNodepublic int numChildred()
public void setChild(java.lang.String branch,
HNode child)
branch - the branch for the childchild - the child itselfpublic LeafNode leafForInstance(Instance inst, SplitNode parent, java.lang.String parentBranch)
HNodeleafForInstance in class HNodeinst - the instance to find the leaf forparent - the parent nodeparentBranch - the parent branchpublic void updateNode(Instance inst)
HNodeupdateNode in class HNodeinst - the instance to update withpublic int installNodeNums(int nodeNum)
installNodeNums in class HNode