public abstract class LeafNode extends java.lang.Object implements Node
| Modifier and Type | Field and Description |
|---|---|
protected int |
size
The number of samples in the node.
|
| Constructor and Description |
|---|
LeafNode(int size)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
depth()
Returns the maximum depth of the tree -- the number of
nodes along the longest path from this node
down to the farthest leaf node.
|
int |
leafs()
Returns the number of leaf nodes in the subtree.
|
Node |
merge()
Try to merge the children nodes and return a leaf node.
|
LeafNode |
predict(smile.data.Tuple x)
Evaluate the tree over an instance.
|
int |
size()
Returns the number of samples in the node.
|
public LeafNode(int size)
size - the number of samples in the nodepublic int size()
Nodepublic int leafs()
Nodepublic LeafNode predict(smile.data.Tuple x)
Nodepublic int depth()
Node