Package moa.classifiers.trees
Class HoeffdingOptionTree.Node
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.trees.HoeffdingOptionTree.Node
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
HoeffdingOptionTree.LearningNode
,HoeffdingOptionTree.SplitNode
- Enclosing class:
- HoeffdingOptionTree
public static class HoeffdingOptionTree.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(HoeffdingOptionTree ht, StringBuilder out, int indent)
HoeffdingOptionTree.FoundNode[]
filterInstanceToLeaves(Instance inst, HoeffdingOptionTree.SplitNode parent, int parentBranch, boolean updateSplitterCounts)
void
filterInstanceToLeaves(Instance inst, HoeffdingOptionTree.SplitNode splitparent, int parentBranch, List<HoeffdingOptionTree.FoundNode> foundNodes, boolean updateSplitterCounts)
double[]
getClassVotes(Instance inst, HoeffdingOptionTree ht)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.double[]
getObservedClassDistribution()
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()
-
filterInstanceToLeaves
public HoeffdingOptionTree.FoundNode[] filterInstanceToLeaves(Instance inst, HoeffdingOptionTree.SplitNode parent, int parentBranch, boolean updateSplitterCounts)
-
filterInstanceToLeaves
public void filterInstanceToLeaves(Instance inst, HoeffdingOptionTree.SplitNode splitparent, int parentBranch, List<HoeffdingOptionTree.FoundNode> foundNodes, boolean updateSplitterCounts)
-
getObservedClassDistribution
public double[] getObservedClassDistribution()
-
getClassVotes
public double[] getClassVotes(Instance inst, HoeffdingOptionTree ht)
-
observedClassDistributionIsPure
public boolean observedClassDistributionIsPure()
-
describeSubtree
public void describeSubtree(HoeffdingOptionTree 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
-
-