public class Node extends Object implements scala.Serializable, Logging
| Constructor and Description |
|---|
Node(int id,
double predict,
boolean isLeaf,
scala.Option<Split> split,
scala.Option<Node> leftNode,
scala.Option<Node> rightNode,
scala.Option<InformationGainStats> stats) |
| Modifier and Type | Method and Description |
|---|---|
void |
build(Node[] nodes)
build the left node and right nodes if not leaf
|
int |
id() |
boolean |
isLeaf() |
scala.Option<Node> |
leftNode() |
double |
predict() |
double |
predictIfLeaf(Vector feature)
predict value if node is not leaf
|
scala.Option<Node> |
rightNode() |
scala.Option<Split> |
split() |
scala.Option<InformationGainStats> |
stats() |
String |
toString() |
initialized, initializeIfNecessary, initializeLogging, initLock, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logTrace, logTrace, logWarning, logWarningpublic Node(int id,
double predict,
boolean isLeaf,
scala.Option<Split> split,
scala.Option<Node> leftNode,
scala.Option<Node> rightNode,
scala.Option<InformationGainStats> stats)
public int id()
public double predict()
public boolean isLeaf()
public scala.Option<Split> split()
public scala.Option<Node> leftNode()
public scala.Option<Node> rightNode()
public scala.Option<InformationGainStats> stats()
public String toString()
toString in class Objectpublic void build(Node[] nodes)
nodes - array of nodespublic double predictIfLeaf(Vector feature)
feature - feature value