org.apache.ignite.ml.tree

## Class NodeData

- java.lang.Object
- - org.apache.ignite.ml.tree.NodeData

-     public class NodeData
      extends Object

  Presenting decision tree data in plain manner (For example: from one parquet row filled with NodeData in Spark DT model).

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    Constructor and Description
    `NodeData()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### id

          public int id

      Id.

    - #### prediction

          public double prediction

      Prediction.

    - #### leftChildId

          public int leftChildId

      Left child id.

    - #### rightChildId

          public int rightChildId

      Right child id.

    - #### threshold

          public double threshold

      Threshold.

    - #### featureIdx

          public int featureIdx

      Feature index.

    - #### isLeafNode

          public boolean isLeafNode

      Is leaf node.

  - ### Constructor Detail

    - #### NodeData

          public NodeData()

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### buildTree

          public static DecisionTreeNode buildTree(Map<Integer,NodeData> nodes,
                                                   NodeData rootNodeData)

      Build tree or sub-tree based on indices and nodes sorted map as a dictionary.
      Parameters:
        `nodes` - The sorted map of nodes.
        `rootNodeData` - Root node data.

    - #### buildDecisionTreeModel

          public static DecisionTreeModel buildDecisionTreeModel(Map<Integer,NodeData> nodes)

      Builds the DT model by the given sorted map of nodes.
      Parameters:
        `nodes` - The sorted map of nodes.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021