org.apache.ignite.ml.tree.randomforest.data

## Class RandomForestTreeModel

- java.lang.Object
- - org.apache.ignite.ml.tree.randomforest.data.RandomForestTreeModel

- All Implemented Interfaces:
    Serializable, AutoCloseable, IgniteModel<Vector,Double>, Model<Vector,Double>

      public class RandomForestTreeModel
      extends Object
      implements IgniteModel<Vector,Double>

  Tree root class.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomForestTreeModel()`
    `RandomForestTreeModel(TreeNode root, Set<Integer> usedFeatures)` Create an instance of TreeRoot.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TreeNode` | `getRootNode()`
    `Set<Integer>` | `getUsedFeatures()`
    `List<TreeNode>` | `leafs()`
    `Double` | `predict(Vector vector)` Make a prediction for the specified input arguments.
    `static String` | `printTree(TreeNode node, boolean pretty)` Represents DecisionTree as String.
    `String` | `toString()`
    `String` | `toString(boolean pretty)`

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

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

    - ### Methods inherited from interface org.apache.ignite.ml.IgniteModel

      `andBefore, andThen, andThen, close, combine`

- - ### Constructor Detail

    - #### RandomForestTreeModel

          public RandomForestTreeModel(TreeNode root,
                                       Set<Integer> usedFeatures)

      Create an instance of TreeRoot.
      Parameters:
        `root` - Root.
        `usedFeatures` - Used features.

    - #### RandomForestTreeModel

          public RandomForestTreeModel()

  - ### Method Detail

    - #### predict

          public Double predict(Vector vector)

      Make a prediction for the specified input arguments.
      Specified by:
        `predict` in interface `Model<Vector,Double>`
      Parameters:
        `vector` - Input arguments.
      Returns:
        Prediction result.

    - #### getUsedFeatures

          public Set<Integer> getUsedFeatures()

    - #### getRootNode

          public TreeNode getRootNode()

    - #### leafs

          public List<TreeNode> leafs()

      Returns:
        All leafs in tree.

    - #### printTree

          public static String printTree(TreeNode node,
                                         boolean pretty)

      Represents DecisionTree as String.
      Parameters:
        `node` - Decision tree.
        `pretty` - Use pretty mode.

    - #### toString

          public String toString(boolean pretty)

      Specified by:
        `toString` in interface `IgniteModel<Vector,Double>`
      Parameters:
        `pretty` - Use pretty mode.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022