org.apache.ignite.ml.dataset.feature.extractor

## Class ExtractionUtils.DefaultLabelVectorizer<K,V,C extends Serializable>

- java.lang.Object
- - org.apache.ignite.ml.dataset.feature.extractor.Vectorizer<K,V,C,Double>
  - - org.apache.ignite.ml.dataset.feature.extractor.ExtractionUtils.DefaultLabelVectorizer<K,V,C>

- Type Parameters:
    `K` - Key type.
    `V` - Value type
    `C` - Type of coordinate.
  All Implemented Interfaces:
    Serializable, BiFunction<K,V,LabeledVector>, IgniteBiFunction<K,V,LabeledVector>, Preprocessor<K,V>, FeatureLabelExtractor<K,V,Double>
  Direct Known Subclasses:
    ExtractionUtils.IntCoordVectorizer, ExtractionUtils.StringCoordVectorizer
  Enclosing class:
    ExtractionUtils

      public abstract static class ExtractionUtils.DefaultLabelVectorizer<K,V,C extends Serializable>
      extends Vectorizer<K,V,C,Double>

  Vectorizer with double-label containing on same level as feature values.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.ignite.ml.dataset.feature.extractor.Vectorizer

      `Vectorizer.LabelCoordinate, Vectorizer.VectorizerAdapter<K,V,C extends Serializable,L>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLabelVectorizer(C... coords)` Creates an instance of Vectorizer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Double` | `label(C coord, K key, V value)` Extract label value by given coordinate.
    `protected Double` | `zero()` Returns default label value for unlabeled data.

    - ### Methods inherited from class org.apache.ignite.ml.dataset.feature.extractor.Vectorizer

      `allCoords, apply, createVector, exclude, extract, feature, labeled, labeled`

    - ### 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.trainers.FeatureLabelExtractor

      `extractFeatures, extractLabel`

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

    - #### DefaultLabelVectorizer

          public DefaultLabelVectorizer(C... coords)

      Creates an instance of Vectorizer.
      Parameters:
        `coords` - Coordinates.

  - ### Method Detail

    - #### label

          protected Double label(C coord,
                                 K key,
                                 V value)

      Extract label value by given coordinate.
      Specified by:
        `label` in class `Vectorizer<K,V,C extends Serializable,Double>`
      Parameters:
        `coord` - Coordinate.
        `key` - Key.
        `value` - Value.
      Returns:
        label value.

    - #### zero

          protected Double zero()

      Returns default label value for unlabeled data.
      Specified by:
        `zero` in class `Vectorizer<K,V,C extends Serializable,Double>`
      Returns:
        label value.

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