Class AbstractTrainingNode<T extends Output<T>>
java.lang.Object
org.tribuo.common.tree.AbstractTrainingNode<T>
- All Implemented Interfaces:
Serializable
,Node<T>
- Direct Known Subclasses:
ClassifierTrainingNode
,JointRegressorTrainingNode
,RegressorTrainingNode
Base class for decision tree nodes used at training time.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
Default buffer size used in the split operation.protected final int
protected AbstractTrainingNode
<T> protected AbstractTrainingNode
<T> protected final int
protected boolean
protected int
protected double
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractTrainingNode
(int depth, int numExamples) Builds an abstract training node. -
Method Summary
Modifier and TypeMethodDescriptionabstract List
<AbstractTrainingNode<T>> buildTree
(int[] indices) Converts a tree from a training representation to the final inference time representation.copy()
Copies the node and it's children.int
getDepth()
The depth of this node in the tree.getNextNode
(SparseVector example) Returns the next node in the tree based on the supplied example, or null if it's a leaf.int
The number of training examples in this node.boolean
isLeaf()
Is it a leaf node?Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tribuo.common.tree.Node
getImpurity
-
Field Details
-
DEFAULT_SIZE
-
depth
-
numExamples
-
split
-
splitID
-
splitValue
-
greaterThan
-
lessThanOrEqual
-
-
Constructor Details
-
AbstractTrainingNode
Builds an abstract training node.- Parameters:
depth
- The depth of this node.numExamples
- The number of examples in this node.
-
-
Method Details
-
buildTree
-
convertTree
Converts a tree from a training representation to the final inference time representation.- Returns:
- The converted subtree.
-
getDepth
-
getNextNode
-
getNumExamples
The number of training examples in this node.- Returns:
- The number of training examples in this node.
-
isLeaf
-
copy
-