org.apache.ignite.ml.tree.data

## Class DecisionTreeData

- java.lang.Object
- - org.apache.ignite.ml.dataset.primitive.FeatureMatrixWithLabelsOnHeapData
  - - org.apache.ignite.ml.tree.data.DecisionTreeData

- All Implemented Interfaces:
    AutoCloseable

      public class DecisionTreeData
      extends FeatureMatrixWithLabelsOnHeapData

  A partition `data` of the containing matrix of features and vector of labels stored in heap with index on features.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecisionTreeData(double[][] features, double[] labels, boolean buildIdx)` Constructs a new instance of decision tree data.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TreeDataIndex` | `createIndexByFilter(int depth, TreeFilter filter)` Builds index in according to current tree depth and cached indexes in upper levels.
    `DecisionTreeData` | `filter(TreeFilter filter)` Filters objects and returns only data that passed filter.
    `double[]` | `getCopiedOriginalLabels()`
    `void` | `setCopiedOriginalLabels(double[] copiedOriginalLabels)`
    `void` | `sort(int col)` Sorts data by specified column in ascending order.

    - ### Methods inherited from class org.apache.ignite.ml.dataset.primitive.FeatureMatrixWithLabelsOnHeapData

      `close, getFeatures, getLabels`

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

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

- - ### Constructor Detail

    - #### DecisionTreeData

          public DecisionTreeData(double[][] features,
                                  double[] labels,
                                  boolean buildIdx)

      Constructs a new instance of decision tree data.
      Parameters:
        `features` - Matrix with features.
        `labels` - Vector with labels.
        `buildIdx` - Build index.

  - ### Method Detail

    - #### filter

          public DecisionTreeData filter(TreeFilter filter)

      Filters objects and returns only data that passed filter.
      Parameters:
        `filter` - Filter.
      Returns:
        Data passed filter.

    - #### sort

          public void sort(int col)

      Sorts data by specified column in ascending order.
      Parameters:
        `col` - Column.

    - #### getCopiedOriginalLabels

          public double[] getCopiedOriginalLabels()

    - #### setCopiedOriginalLabels

          public void setCopiedOriginalLabels(double[] copiedOriginalLabels)

    - #### createIndexByFilter

          public TreeDataIndex createIndexByFilter(int depth,
                                                   TreeFilter filter)

      Builds index in according to current tree depth and cached indexes in upper levels. Uses depth as key of cached index and replaces cached index with same key.
      Parameters:
        `depth` - Tree Depth.
        `filter` - Filter.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022