Package moa.classifiers.trees
Class SelfOptimisingBaseTree.LeafNode
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.trees.SelfOptimisingBaseTree.Node
-
- moa.classifiers.trees.SelfOptimisingBaseTree.LeafNode
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Enclosing class:
- SelfOptimisingBaseTree
public static class SelfOptimisingBaseTree.LeafNode extends SelfOptimisingBaseTree.Node
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AutoExpandVector<FIMTDDNumericAttributeClassObserver>
attributeObservers
protected double
examplesSeenAtLastSplitEvaluation
SelfOptimisingBaseTree.FIMTDDPerceptron
learningModel
double
learntInstances
protected int[]
listAttributes
protected int
numAttributes
double[]
sumsForAllAttrs
-
Fields inherited from class moa.classifiers.trees.SelfOptimisingBaseTree.Node
alternateTree, changeDetection, examplesSeen, ID, originalNode, parent, sumOfAbsErrors, sumOfSquares, sumOfValues, tree
-
-
Constructor Summary
Constructors Constructor Description LeafNode(SelfOptimisingBaseTree tree, int subspaceSize)
Create a new LeafNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkForSplit(SelfOptimisingBaseTree tree)
void
describeSubtree(StringBuilder out, int indent)
AttributeSplitSuggestion[]
getBestSplitSuggestions(SplitCriterion criterion)
Return the best split suggestions for this node using the given split criteriaint
getChildIndex(SelfOptimisingBaseTree.Node child)
int
getNumSubtrees()
double
getPrediction(Instance inst)
double
getPredictionModel(Instance inst)
Retrieve the class votes using the perceptron learnerdouble
getPredictionTargetMean(Instance inst)
void
learnFromInstance(Instance inst, boolean growthAllowed, SelfOptimisingBaseTree selfOptimisingBaseTree, SelfOptimisingBaseTree.LeafNode node)
Method to learn from an instance that passes the new instance to the perceptron learner, and also prevents the class value from being truncated to an int when it is passed to the attribute observervoid
setChild(int parentBranch, SelfOptimisingBaseTree.Node node)
protected boolean
skipInLevelCount()
-
Methods inherited from class moa.classifiers.trees.SelfOptimisingBaseTree.Node
calcByteSize, copyStatistics, disableChangeDetection, getDescription, getLevel, getParent, restartChangeDetection, setParent
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Field Detail
-
learningModel
public SelfOptimisingBaseTree.FIMTDDPerceptron learningModel
-
attributeObservers
protected AutoExpandVector<FIMTDDNumericAttributeClassObserver> attributeObservers
-
examplesSeenAtLastSplitEvaluation
protected double examplesSeenAtLastSplitEvaluation
-
listAttributes
protected int[] listAttributes
-
numAttributes
protected int numAttributes
-
sumsForAllAttrs
public double[] sumsForAllAttrs
-
learntInstances
public double learntInstances
-
-
Constructor Detail
-
LeafNode
public LeafNode(SelfOptimisingBaseTree tree, int subspaceSize)
Create a new LeafNode
-
-
Method Detail
-
setChild
public void setChild(int parentBranch, SelfOptimisingBaseTree.Node node)
- Overrides:
setChild
in classSelfOptimisingBaseTree.Node
-
getChildIndex
public int getChildIndex(SelfOptimisingBaseTree.Node child)
- Overrides:
getChildIndex
in classSelfOptimisingBaseTree.Node
-
getNumSubtrees
public int getNumSubtrees()
- Overrides:
getNumSubtrees
in classSelfOptimisingBaseTree.Node
-
skipInLevelCount
protected boolean skipInLevelCount()
- Overrides:
skipInLevelCount
in classSelfOptimisingBaseTree.Node
-
learnFromInstance
public void learnFromInstance(Instance inst, boolean growthAllowed, SelfOptimisingBaseTree selfOptimisingBaseTree, SelfOptimisingBaseTree.LeafNode node)
Method to learn from an instance that passes the new instance to the perceptron learner, and also prevents the class value from being truncated to an int when it is passed to the attribute observer
-
getBestSplitSuggestions
public AttributeSplitSuggestion[] getBestSplitSuggestions(SplitCriterion criterion)
Return the best split suggestions for this node using the given split criteria
-
getPredictionModel
public double getPredictionModel(Instance inst)
Retrieve the class votes using the perceptron learner
-
getPredictionTargetMean
public double getPredictionTargetMean(Instance inst)
-
getPrediction
public double getPrediction(Instance inst)
- Overrides:
getPrediction
in classSelfOptimisingBaseTree.Node
-
checkForSplit
public void checkForSplit(SelfOptimisingBaseTree tree)
-
describeSubtree
public void describeSubtree(StringBuilder out, int indent)
- Overrides:
describeSubtree
in classSelfOptimisingBaseTree.Node
-
-