Package cc.mallet.classify
Class C45.Node
- java.lang.Object
-
- cc.mallet.classify.C45.Node
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- C45
public static class C45.Node extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Node(InstanceList ilist, C45.Node parent, int minNumInsts)
Node(InstanceList ilist, C45.Node parent, int minNumInsts, int[] instIndices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
computeCostAndPrune()
int
depth()
The root has depth zero.GainRatio
getGainRatio()
InstanceList
getInstances()
C45.Node
getLeftChild()
double
getMDL()
Calculates the minimum description length of this node, i.e., the length of the binary encoding that describes the feature and the split value used at this nodejava.lang.String
getName()
int
getNumDescendants()
Count the number of non-leaf descendant nodesC45.Node
getParent()
C45.Node
getRightChild()
int
getSize()
java.lang.Object
getSplitFeature()
java.lang.StringBuffer
getStringBufferName()
boolean
isLeaf()
boolean
isRoot()
void
print()
Prints the tree rooted at this nodevoid
print(java.lang.String prefix)
void
split()
void
stopGrowth()
Saves memory by allowing ilist to be garbage collected (deletes this node's associated instance list)
-
-
-
Constructor Detail
-
Node
public Node(InstanceList ilist, C45.Node parent, int minNumInsts)
-
Node
public Node(InstanceList ilist, C45.Node parent, int minNumInsts, int[] instIndices)
-
-
Method Detail
-
depth
public int depth()
The root has depth zero.
-
getSize
public int getSize()
-
isLeaf
public boolean isLeaf()
-
isRoot
public boolean isRoot()
-
getParent
public C45.Node getParent()
-
getLeftChild
public C45.Node getLeftChild()
-
getRightChild
public C45.Node getRightChild()
-
getGainRatio
public GainRatio getGainRatio()
-
getSplitFeature
public java.lang.Object getSplitFeature()
-
getInstances
public InstanceList getInstances()
-
getNumDescendants
public int getNumDescendants()
Count the number of non-leaf descendant nodes
-
split
public void split()
-
computeCostAndPrune
public double computeCostAndPrune()
-
getMDL
public double getMDL()
Calculates the minimum description length of this node, i.e., the length of the binary encoding that describes the feature and the split value used at this node
-
stopGrowth
public void stopGrowth()
Saves memory by allowing ilist to be garbage collected (deletes this node's associated instance list)
-
getName
public java.lang.String getName()
-
getStringBufferName
public java.lang.StringBuffer getStringBufferName()
-
print
public void print()
Prints the tree rooted at this node
-
print
public void print(java.lang.String prefix)
-
-