public class TreeNode extends Object implements IgniteModel<Vector,Double>
Modifier and Type | Class and Description |
---|---|
static class |
TreeNode.Type
Type of node.
|
Constructor and Description |
---|
TreeNode(long id,
int treeId)
Create an instance of TreeNode.
|
Modifier and Type | Method and Description |
---|---|
int |
getDepth() |
NodeId |
getId() |
double |
getImpurity() |
TreeNode |
getLeft() |
TreeNode |
getRight() |
TreeNode.Type |
getType() |
Double |
predict(Vector features)
Make a prediction for the specified input arguments.
|
NodeId |
predictNextNodeKey(Vector features)
Returns leaf node for feature vector in according to decision tree.
|
void |
setImpurity(double impurity) |
void |
setVal(double val) |
List<TreeNode> |
toConditional(int featureId,
double val)
Convert node to conditional node.
|
void |
toLeaf(double val)
Convert node to leaf.
|
public TreeNode(long id, int treeId)
id
- Id in according to breadth-first search ordering.treeId
- Tree id.public NodeId predictNextNodeKey(Vector features)
features
- Features.public List<TreeNode> toConditional(int featureId, double val)
featureId
- Feature id.val
- Value.public void toLeaf(double val)
val
- Value.public NodeId getId()
public void setVal(double val)
public TreeNode.Type getType()
public void setImpurity(double impurity)
public double getImpurity()
public int getDepth()
public TreeNode getLeft()
public TreeNode getRight()
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024