org.apache.ignite.ml.tree.data

## Class TreeDataIndex

- java.lang.Object
- - org.apache.ignite.ml.tree.data.TreeDataIndex

-     public class TreeDataIndex
      extends Object

  Index for representing sorted dataset rows for each features. It may be reused while decision tree learning at several levels through filter method.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TreeDataIndex(double[][] features, double[] labels)` Constructs an instance of TreeDataIndex.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `columnsCount()`
    `double` | `featureInSortedOrder(int k, int featureId)` Returns feature value for kth order statistic for target feature.
    `double[]` | `featuresInSortedOrder(int k, int featureId)` Returns vector of original features for kth order statistic for target feature.
    `TreeDataIndex` | `filter(TreeFilter filter)` Creates projection of current index in according to `TreeFilter`.
    `double` | `labelInSortedOrder(int k, int featureId)` Returns label for kth order statistic for target feature.
    `int` | `rowsCount()`

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

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

- - ### Constructor Detail

    - #### TreeDataIndex

          public TreeDataIndex(double[][] features,
                               double[] labels)

      Constructs an instance of TreeDataIndex.
      Parameters:
        `features` - Features.
        `labels` - Labels.

  - ### Method Detail

    - #### labelInSortedOrder

          public double labelInSortedOrder(int k,
                                           int featureId)

      Returns label for kth order statistic for target feature.
      Parameters:
        `k` - K.
        `featureId` - Feature id.
      Returns:
        Label value.

    - #### featuresInSortedOrder

          public double[] featuresInSortedOrder(int k,
                                                int featureId)

      Returns vector of original features for kth order statistic for target feature.
      Parameters:
        `k` - K.
        `featureId` - Feature id.
      Returns:
        Features vector.

    - #### featureInSortedOrder

          public double featureInSortedOrder(int k,
                                             int featureId)

      Returns feature value for kth order statistic for target feature.
      Parameters:
        `k` - K.
        `featureId` - Feature id.
      Returns:
        Feature value.

    - #### filter

          public TreeDataIndex filter(TreeFilter filter)

      Creates projection of current index in according to `TreeFilter`.
      Parameters:
        `filter` - Filter.
      Returns:
        Projection of current index onto smaller index in according to rows filter.

    - #### rowsCount

          public int rowsCount()

      Returns:
        count of rows in current index.

    - #### columnsCount

          public int columnsCount()

      Returns:
        count of columns in current index.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020