org.apache.ignite.ml.preprocessing.minmaxscaling

## Class MinMaxScalerPreprocessor<K,V>

- java.lang.Object
- - org.apache.ignite.ml.preprocessing.minmaxscaling.MinMaxScalerPreprocessor<K,V>

- Type Parameters:
    `K` - Type of a key in `upstream` data.
    `V` - Type of a value in `upstream` data.
  All Implemented Interfaces:
    Serializable, BiFunction<K,V,LabeledVector>, DeployableObject, IgniteBiFunction<K,V,LabeledVector>, Preprocessor<K,V>

      public final class MinMaxScalerPreprocessor<K,V>
      extends Object
      implements Preprocessor<K,V>, DeployableObject

  Preprocessing function that makes minmaxscaling. From mathematical point of view it's the following function which is applied to every element in dataset: `a_i = (a_i - min_i) / (max_i - min_i) for all i`, where `i` is a number of column, `max_i` is the value of the maximum element in this columns, `min_i` is the value of the minimal element in this column.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinMaxScalerPreprocessor(double[] min, double[] max, Preprocessor<K,V> basePreprocessor)` Constructs a new instance of minmaxscaling preprocessor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LabeledVector` | `apply(K k, V v)` Applies this preprocessor.
    `List<Object>` | `getDependencies()` Returns dependencies of this object that can be object with class defined by client side and unknown for server.
    `double[]` | `getMax()`
    `double[]` | `getMin()`

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

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

    - ### Methods inherited from interface org.apache.ignite.ml.preprocessing.Preprocessor

      `map`

    - ### Methods inherited from interface org.apache.ignite.ml.math.functions.IgniteBiFunction

      `andThen`

    - ### Methods inherited from interface java.util.function.BiFunction

      `andThen`

- - ### Constructor Detail

    - #### MinMaxScalerPreprocessor

          public MinMaxScalerPreprocessor(double[] min,
                                          double[] max,
                                          Preprocessor<K,V> basePreprocessor)

      Constructs a new instance of minmaxscaling preprocessor.
      Parameters:
        `min` - Minimal values.
        `max` - Maximum values.
        `basePreprocessor` - Base preprocessor.

  - ### Method Detail

    - #### apply

          public LabeledVector apply(K k,
                                     V v)

      Applies this preprocessor.
      Specified by:
        `apply` in interface `BiFunction<K,V,LabeledVector>`
      Parameters:
        `k` - Key.
        `v` - Value.
      Returns:
        Preprocessed row.

    - #### getMin

          public double[] getMin()

    - #### getMax

          public double[] getMax()

    - #### getDependencies

          public List<Object> getDependencies()

      Returns dependencies of this object that can be object with class defined by client side and unknown for server.
      Specified by:
        `getDependencies` in interface `DeployableObject`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021