org.apache.ignite.ml.tree.impurity

## Interface ImpurityMeasure<T extends ImpurityMeasure<T>>

- Type Parameters:
    `T` - Type of this impurity measure.
  All Superinterfaces:
    Comparable<T>, Serializable
  All Known Implementing Classes:
    GiniImpurityMeasure, MSEImpurityMeasure

      public interface ImpurityMeasure<T extends ImpurityMeasure<T>>
      extends Comparable<T>, Serializable

  Base interface for impurity measures that can be used in distributed decision tree algorithm.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `add(T measure)` Adds the given impurity to this.
    `default int` | `compareTo(T o)`
    `double` | `impurity()` Calculates impurity measure as a single double value.
    `T` | `subtract(T measure)` Subtracts the given impurity for this.

- - ### Method Detail

    - #### impurity

          double impurity()

      Calculates impurity measure as a single double value.
      Returns:
        Impurity measure value.

    - #### add

          T add(T measure)

      Adds the given impurity to this.
      Parameters:
        `measure` - Another impurity.
      Returns:
        Sum of this and the given impurity.

    - #### subtract

          T subtract(T measure)

      Subtracts the given impurity for this.
      Parameters:
        `measure` - Another impurity.
      Returns:
        Difference of this and the given impurity.

    - #### compareTo

          default int compareTo(T o)

      Specified by:
        `compareTo` in interface `Comparable<T extends ImpurityMeasure<T>>`

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023