Package moa.classifiers.trees
Class HoeffdingTree.SplitNode
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.trees.HoeffdingTree.Node
-
- moa.classifiers.trees.HoeffdingTree.SplitNode
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
HoeffdingAdaptiveTree.AdaSplitNode
,RuleSplitNode
- Enclosing class:
- HoeffdingTree
public static class HoeffdingTree.SplitNode extends HoeffdingTree.Node
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AutoExpandVector<HoeffdingTree.Node>
children
protected InstanceConditionalTest
splitTest
-
Fields inherited from class moa.classifiers.trees.HoeffdingTree.Node
observedClassDistribution
-
-
Constructor Summary
Constructors Constructor Description SplitNode(InstanceConditionalTest splitTest, double[] classObservations)
SplitNode(InstanceConditionalTest splitTest, double[] classObservations, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calcByteSize()
int
calcByteSizeIncludingSubtree()
void
describeSubtree(HoeffdingTree ht, StringBuilder out, int indent)
HoeffdingTree.FoundNode
filterInstanceToLeaf(Instance inst, HoeffdingTree.SplitNode parent, int parentBranch)
HoeffdingTree.Node
getChild(int index)
AutoExpandVector<HoeffdingTree.Node>
getChildren()
double[]
getObservedClassDistributionAtLeavesReachableThroughThisNode()
InstanceConditionalTest
getSplitTest()
int
instanceChildIndex(Instance inst)
boolean
isLeaf()
int
numChildren()
void
setChild(int index, HoeffdingTree.Node child)
int
subtreeDepth()
-
Methods inherited from class moa.classifiers.trees.HoeffdingTree.Node
calculatePromise, getClassVotes, getDescription, getObservedClassDistribution, observedClassDistributionIsPure
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Field Detail
-
splitTest
protected InstanceConditionalTest splitTest
-
children
protected AutoExpandVector<HoeffdingTree.Node> children
-
-
Constructor Detail
-
SplitNode
public SplitNode(InstanceConditionalTest splitTest, double[] classObservations, int size)
-
SplitNode
public SplitNode(InstanceConditionalTest splitTest, double[] classObservations)
-
-
Method Detail
-
calcByteSize
public int calcByteSize()
- Overrides:
calcByteSize
in classHoeffdingTree.Node
-
calcByteSizeIncludingSubtree
public int calcByteSizeIncludingSubtree()
- Overrides:
calcByteSizeIncludingSubtree
in classHoeffdingTree.Node
-
getObservedClassDistributionAtLeavesReachableThroughThisNode
public double[] getObservedClassDistributionAtLeavesReachableThroughThisNode()
- Overrides:
getObservedClassDistributionAtLeavesReachableThroughThisNode
in classHoeffdingTree.Node
-
getChildren
public AutoExpandVector<HoeffdingTree.Node> getChildren()
-
getSplitTest
public InstanceConditionalTest getSplitTest()
-
numChildren
public int numChildren()
-
setChild
public void setChild(int index, HoeffdingTree.Node child)
-
getChild
public HoeffdingTree.Node getChild(int index)
-
instanceChildIndex
public int instanceChildIndex(Instance inst)
-
isLeaf
public boolean isLeaf()
- Overrides:
isLeaf
in classHoeffdingTree.Node
-
filterInstanceToLeaf
public HoeffdingTree.FoundNode filterInstanceToLeaf(Instance inst, HoeffdingTree.SplitNode parent, int parentBranch)
- Overrides:
filterInstanceToLeaf
in classHoeffdingTree.Node
-
describeSubtree
public void describeSubtree(HoeffdingTree ht, StringBuilder out, int indent)
- Overrides:
describeSubtree
in classHoeffdingTree.Node
-
subtreeDepth
public int subtreeDepth()
- Overrides:
subtreeDepth
in classHoeffdingTree.Node
-
-