Package moa.classifiers.trees
Class SelfOptimisingBaseTree.Node
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.classifiers.trees.SelfOptimisingBaseTree.Node
-
- All Implemented Interfaces:
Serializable
,MOAObject
- Direct Known Subclasses:
SelfOptimisingBaseTree.InnerNode
,SelfOptimisingBaseTree.LeafNode
- Enclosing class:
- SelfOptimisingBaseTree
public abstract static class SelfOptimisingBaseTree.Node extends AbstractMOAObject
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SelfOptimisingBaseTree.Node
alternateTree
protected boolean
changeDetection
protected double
examplesSeen
int
ID
protected SelfOptimisingBaseTree.Node
originalNode
protected SelfOptimisingBaseTree.Node
parent
protected double
sumOfAbsErrors
protected double
sumOfSquares
protected double
sumOfValues
protected SelfOptimisingBaseTree
tree
-
Constructor Summary
Constructors Constructor Description Node(SelfOptimisingBaseTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calcByteSize()
void
copyStatistics(SelfOptimisingBaseTree.Node node)
void
describeSubtree(StringBuilder out, int indent)
void
disableChangeDetection()
int
getChildIndex(SelfOptimisingBaseTree.Node child)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.int
getLevel()
int
getNumSubtrees()
SelfOptimisingBaseTree.Node
getParent()
Return the parent nodedouble
getPrediction(Instance inst)
void
restartChangeDetection()
void
setChild(int parentBranch, SelfOptimisingBaseTree.Node node)
void
setParent(SelfOptimisingBaseTree.Node parent)
Set the parent nodeprotected boolean
skipInLevelCount()
-
Methods inherited from class moa.AbstractMOAObject
copy, copy, measureByteSize, measureByteSize, toString
-
-
-
-
Field Detail
-
ID
public int ID
-
tree
protected SelfOptimisingBaseTree tree
-
changeDetection
protected boolean changeDetection
-
parent
protected SelfOptimisingBaseTree.Node parent
-
alternateTree
protected SelfOptimisingBaseTree.Node alternateTree
-
originalNode
protected SelfOptimisingBaseTree.Node originalNode
-
examplesSeen
protected double examplesSeen
-
sumOfValues
protected double sumOfValues
-
sumOfSquares
protected double sumOfSquares
-
sumOfAbsErrors
protected double sumOfAbsErrors
-
-
Constructor Detail
-
Node
public Node(SelfOptimisingBaseTree tree)
-
-
Method Detail
-
copyStatistics
public void copyStatistics(SelfOptimisingBaseTree.Node node)
-
calcByteSize
public int calcByteSize()
-
setParent
public void setParent(SelfOptimisingBaseTree.Node parent)
Set the parent node
-
getParent
public SelfOptimisingBaseTree.Node getParent()
Return the parent node
-
disableChangeDetection
public void disableChangeDetection()
-
restartChangeDetection
public void restartChangeDetection()
-
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
-
getPrediction
public double getPrediction(Instance inst)
-
describeSubtree
public void describeSubtree(StringBuilder out, int indent)
-
getLevel
public int getLevel()
-
setChild
public void setChild(int parentBranch, SelfOptimisingBaseTree.Node node)
-
getChildIndex
public int getChildIndex(SelfOptimisingBaseTree.Node child)
-
getNumSubtrees
public int getNumSubtrees()
-
skipInLevelCount
protected boolean skipInLevelCount()
-
-