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

## Class ImpurityHistogram

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

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    GiniHistogram, MSEHistogram

      public abstract class ImpurityHistogram
      extends Object
      implements Serializable

  Helper class for ImpurityHistograms.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<Integer>` | `bucketIds` Bucket ids.
    `protected int` | `featureId` Feature id.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImpurityHistogram(int featureId)` Creates an instance of ImpurityHistogram.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Optional<NodeSplit>` | `checkAndReturnSplitValue(int bestBucketId, double bestSplitVal, double bestImpurity)` Checks split value validity and return Optional-wrap of it.

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

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

- - ### Field Detail

    - #### bucketIds

          protected final Set<Integer> bucketIds

      Bucket ids.

    - #### featureId

          protected final int featureId

      Feature id.

  - ### Constructor Detail

    - #### ImpurityHistogram

          public ImpurityHistogram(int featureId)

      Creates an instance of ImpurityHistogram.
      Parameters:
        `featureId` - Feature id.

  - ### Method Detail

    - #### checkAndReturnSplitValue

          protected Optional<NodeSplit> checkAndReturnSplitValue(int bestBucketId,
                                                                 double bestSplitVal,
                                                                 double bestImpurity)

      Checks split value validity and return Optional-wrap of it. In other case returns Optional.empty
      Parameters:
        `bestBucketId` - Best bucket id.
        `bestSplitVal` - Best split value.
        `bestImpurity` - Best impurity.
      Returns:
        Best split value.

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