public abstract class AbstractTrainingNode<T extends Output<T>> extends Object implements Node<T>
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_SIZE
Default buffer size used in the split operation.
|
protected int |
depth |
protected AbstractTrainingNode<T> |
greaterThan |
protected AbstractTrainingNode<T> |
lessThanOrEqual |
protected int |
numExamples |
protected boolean |
split |
protected int |
splitID |
protected double |
splitValue |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTrainingNode(int depth,
int numExamples)
Builds an abstract training node.
|
Modifier and Type | Method and Description |
---|---|
abstract List<AbstractTrainingNode<T>> |
buildTree(int[] indices) |
abstract Node<T> |
convertTree()
Converts a tree from a training representation to the final inference time representation.
|
Node<T> |
copy()
Copies the node and it's children.
|
int |
getDepth()
The depth of this node in the tree.
|
Node<T> |
getNextNode(SparseVector example)
Returns the next node in the tree based on the supplied example, or null if it's a leaf.
|
int |
getNumExamples()
The number of training examples in this node.
|
boolean |
isLeaf()
Is it a leaf node?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImpurity
protected static final int DEFAULT_SIZE
protected final int depth
protected final int numExamples
protected boolean split
protected int splitID
protected double splitValue
protected AbstractTrainingNode<T extends Output<T>> greaterThan
protected AbstractTrainingNode<T extends Output<T>> lessThanOrEqual
protected AbstractTrainingNode(int depth, int numExamples)
depth
- The depth of this node.numExamples
- The number of examples in this node.public abstract List<AbstractTrainingNode<T>> buildTree(int[] indices)
public abstract Node<T> convertTree()
public int getDepth()
public Node<T> getNextNode(SparseVector example)
Node
getNextNode
in interface Node<T extends Output<T>>
example
- The example.public int getNumExamples()
public boolean isLeaf()
Node
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.