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

## Class BinaryObjectVectorizer<K>

- 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,String>
    - - org.apache.ignite.ml.dataset.feature.extractor.ExtractionUtils.StringCoordVectorizer<K,BinaryObject>
      - - org.apache.ignite.ml.dataset.feature.extractor.impl.BinaryObjectVectorizer<K>

- Type Parameters:
    `K` - Type of key.
  All Implemented Interfaces:
    Serializable, BiFunction<K,BinaryObject,LabeledVector>, DeployableObject, IgniteBiFunction<K,BinaryObject,LabeledVector>, Preprocessor<K,BinaryObject>, FeatureLabelExtractor<K,BinaryObject,Double>

      public final class BinaryObjectVectorizer<K>
      extends ExtractionUtils.StringCoordVectorizer<K,BinaryObject>
      implements DeployableObject

  Vectorizer on binary objects.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BinaryObjectVectorizer.Mapping` Feature values mapping for non-number features.

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

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_VALUE` Object for denoting default value of feature mapping.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinaryObjectVectorizer(String... coords)` Creates an instance of Vectorizer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected List<String>` | `allCoords(K key, BinaryObject value)` Returns list of all coordinate with feature values.
    `protected Vector` | `createVector(int size)` Create an instance of vector.
    `protected Double` | `feature(String coord, K key, BinaryObject value)` Extracts feature value by given coordinate.
    `List<Object>` | `getDependencies()` Returns dependencies of this object that can be object with class defined by client side and unknown for server.
    `BinaryObjectVectorizer` | `withFeature(String coord, BinaryObjectVectorizer.Mapping valuesMapping)` Sets values mapping for feature.

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

      `label, zero`

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

      `apply, exclude, extract, 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`

- - ### Field Detail

    - #### DEFAULT_VALUE

          public static final String DEFAULT_VALUE

      Object for denoting default value of feature mapping.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BinaryObjectVectorizer

          public BinaryObjectVectorizer(String... coords)

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

  - ### Method Detail

    - #### withFeature

          public BinaryObjectVectorizer withFeature(String coord,
                                                    BinaryObjectVectorizer.Mapping valuesMapping)

      Sets values mapping for feature.
      Parameters:
        `coord` - Feature coordinate.
        `valuesMapping` - Mapping.
      Returns:
        this.

    - #### feature

          protected Double feature(String coord,
                                   K key,
                                   BinaryObject value)

      Extracts feature value by given coordinate.
      Specified by:
        `feature` in class `Vectorizer<K,BinaryObject,String,Double>`
      Parameters:
        `coord` - Coordinate.
        `key` - Key.
        `value` - Value.
      Returns:
        feature value.

    - #### allCoords

          protected List<String> allCoords(K key,
                                           BinaryObject value)

      Returns list of all coordinate with feature values.
      Specified by:
        `allCoords` in class `Vectorizer<K,BinaryObject,String,Double>`
      Parameters:
        `key` - Key.
        `value` - Value.
      Returns:
        all coordinates list.

    - #### createVector

          protected Vector createVector(int size)

      Create an instance of vector.
      Overrides:
        `createVector` in class `Vectorizer<K,BinaryObject,String,Double>`
      Parameters:
        `size` - Vector size.
      Returns:
        vector.

    - #### 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.10.0
Release Date | : March 10 2021