org.apache.ignite.ml.dataset.primitive.builder.data

## Class SimpleDatasetDataBuilder<K,V,C extends Serializable,CO extends Serializable>

- java.lang.Object
- - org.apache.ignite.ml.dataset.primitive.builder.data.SimpleDatasetDataBuilder<K,V,C,CO>

- Type Parameters:
    `K` - Type of a key in `upstream` data.
    `V` - Type of a value in `upstream` data.
    `C` - Type of a partition `context`.
    `CO` - Type of a coordinate for vectorizer.
  All Implemented Interfaces:
    Serializable, PartitionDataBuilder<K,V,C,SimpleDatasetData>

      public class SimpleDatasetDataBuilder<K,V,C extends Serializable,CO extends Serializable>
      extends Object
      implements PartitionDataBuilder<K,V,C,SimpleDatasetData>

  A partition `data` builder that makes `SimpleDatasetData`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleDatasetDataBuilder(Preprocessor<K,V> preprocessor)` Construct a new instance of partition `data` builder that makes `SimpleDatasetData`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SimpleDatasetData` | `build(LearningEnvironment env, Iterator<UpstreamEntry<K,V>> upstreamData, long upstreamDataSize, C ctx)` Builds a new partition `data` from a partition `upstream` data and partition `context`.

    - ### 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.dataset.PartitionDataBuilder

      `andThen, build`

- - ### Constructor Detail

    - #### SimpleDatasetDataBuilder

          public SimpleDatasetDataBuilder(Preprocessor<K,V> preprocessor)

      Construct a new instance of partition `data` builder that makes `SimpleDatasetData`.
      Parameters:
        `preprocessor` - Function that extracts features from an `upstream` data.

  - ### Method Detail

    - #### build

          public SimpleDatasetData build(LearningEnvironment env,
                                         Iterator<UpstreamEntry<K,V>> upstreamData,
                                         long upstreamDataSize,
                                         C ctx)

      Builds a new partition `data` from a partition `upstream` data and partition `context`. Important: there is no guarantee that there will be no more than one UpstreamEntry with given key, UpstreamEntry should be thought rather as a container saving all data from upstream, but omitting uniqueness constraint. This constraint is omitted to allow upstream data transformers in `DatasetBuilder` replicating entries. For example it can be useful for bootstrapping.
      Specified by:
        `build` in interface `PartitionDataBuilder<K,V,C extends Serializable,SimpleDatasetData>`
      Parameters:
        `env` - Learning environment.
        `upstreamData` - Partition `upstream` data.
        `upstreamDataSize` - Partition `upstream` data size.
        `ctx` - Partition `context`.
      Returns:
        Partition `data`.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020