public class NodeData extends Object
Modifier and Type | Field and Description |
---|---|
int |
featureIdx
Feature index.
|
int |
id
Id.
|
boolean |
isLeafNode
Is leaf node.
|
int |
leftChildId
Left child id.
|
double |
prediction
Prediction.
|
int |
rightChildId
Right child id.
|
double |
threshold
Threshold.
|
Constructor and Description |
---|
NodeData() |
Modifier and Type | Method and Description |
---|---|
static DecisionTreeModel |
buildDecisionTreeModel(Map<Integer,NodeData> nodes)
Builds the DT model by the given sorted map of nodes.
|
static DecisionTreeNode |
buildTree(Map<Integer,NodeData> nodes,
NodeData rootNodeData)
Build tree or sub-tree based on indices and nodes sorted map as a dictionary.
|
String |
toString() |
public int id
public double prediction
public int leftChildId
public int rightChildId
public double threshold
public int featureIdx
public boolean isLeafNode
public static DecisionTreeNode buildTree(Map<Integer,NodeData> nodes, NodeData rootNodeData)
nodes
- The sorted map of nodes.rootNodeData
- Root node data.public static DecisionTreeModel buildDecisionTreeModel(Map<Integer,NodeData> nodes)
nodes
- The sorted map of nodes.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021