org.apache.ignite.ml.preprocessing.normalization

## Class NormalizationPreprocessor<K,V>

- java.lang.Object
- - org.apache.ignite.ml.preprocessing.normalization.NormalizationPreprocessor<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 NormalizationPreprocessor<K,V>
      extends Object
      implements Preprocessor<K,V>, DeployableObject

  Preprocessing function that makes normalization. Normalization is the process of scaling individual samples to have unit norm. This process can be useful if you plan to use a quadratic form such as the dot-product or any other kernel to quantify the similarity of any pair of samples.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NormalizationPreprocessor(int p, Preprocessor<K,V> basePreprocessor)` Constructs a new instance of Normalization 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` | `p()` Gets the degree of L^p space parameter value.

    - ### 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

    - #### NormalizationPreprocessor

          public NormalizationPreprocessor(int p,
                                           Preprocessor<K,V> basePreprocessor)

      Constructs a new instance of Normalization preprocessor.
      Parameters:
        `p` - Degree of L^p space value.
        `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.

    - #### p

          public double p()

      Gets the degree of L^p space parameter value.

    - #### 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`

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