Package moa.classifiers.trees
Class HoeffdingTree.Node
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.trees.HoeffdingTree.Node
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
HoeffdingTree.LearningNode
,HoeffdingTree.SplitNode
- Enclosing class:
- HoeffdingTree
public static class HoeffdingTree.Node extends AbstractMOAObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected DoubleVector
observedClassDistribution
-
Constructor Summary
Constructors Constructor Description Node(double[] classObservations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calcByteSize()
int
calcByteSizeIncludingSubtree()
double
calculatePromise()
void
describeSubtree(HoeffdingTree ht, StringBuilder out, int indent)
HoeffdingTree.FoundNode
filterInstanceToLeaf(Instance inst, HoeffdingTree.SplitNode parent, int parentBranch)
double[]
getClassVotes(Instance inst, HoeffdingTree ht)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.double[]
getObservedClassDistribution()
double[]
getObservedClassDistributionAtLeavesReachableThroughThisNode()
boolean
isLeaf()
boolean
observedClassDistributionIsPure()
int
subtreeDepth()
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Field Detail
-
observedClassDistribution
protected DoubleVector observedClassDistribution
-
-
Method Detail
-
calcByteSize
public int calcByteSize()
-
calcByteSizeIncludingSubtree
public int calcByteSizeIncludingSubtree()
-
isLeaf
public boolean isLeaf()
-
filterInstanceToLeaf
public HoeffdingTree.FoundNode filterInstanceToLeaf(Instance inst, HoeffdingTree.SplitNode parent, int parentBranch)
-
getObservedClassDistribution
public double[] getObservedClassDistribution()
-
getObservedClassDistributionAtLeavesReachableThroughThisNode
public double[] getObservedClassDistributionAtLeavesReachableThroughThisNode()
-
getClassVotes
public double[] getClassVotes(Instance inst, HoeffdingTree ht)
-
observedClassDistributionIsPure
public boolean observedClassDistributionIsPure()
-
describeSubtree
public void describeSubtree(HoeffdingTree ht, StringBuilder out, int indent)
-
subtreeDepth
public int subtreeDepth()
-
calculatePromise
public double calculatePromise()
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
-