public static class DecisionTreeModelReadWrite.NodeData
extends Object
implements scala.Product, scala.Serializable
Node
param: id Index used for tree reconstruction. Indices follow a pre-order traversal. param: impurityStats Stats array. Impurity type is stored in metadata. param: rawCount The unweighted number of samples falling in this node. param: gain Gain, or arbitrary value if leaf node. param: leftChild Left child index, or arbitrary value if leaf node. param: rightChild Right child index, or arbitrary value if leaf node. param: split Split info, or arbitrary value if leaf node.
Constructor and Description |
---|
NodeData(int id,
double prediction,
double impurity,
double[] impurityStats,
long rawCount,
double gain,
int leftChild,
int rightChild,
DecisionTreeModelReadWrite.SplitData split) |
Modifier and Type | Method and Description |
---|---|
double |
gain() |
int |
id() |
double |
impurity() |
double[] |
impurityStats() |
int |
leftChild() |
double |
prediction() |
long |
rawCount() |
int |
rightChild() |
DecisionTreeModelReadWrite.SplitData |
split() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public NodeData(int id, double prediction, double impurity, double[] impurityStats, long rawCount, double gain, int leftChild, int rightChild, DecisionTreeModelReadWrite.SplitData split)
public int id()
public double prediction()
public double impurity()
public double[] impurityStats()
public long rawCount()
public double gain()
public int leftChild()
public int rightChild()
public DecisionTreeModelReadWrite.SplitData split()