org.apache.ignite.ml.dataset

## Interface DatasetBuilder<K,V>

- Type Parameters:
    `K` - Type of a key in `upstream` data.
    `V` - Type of a value in `upstream` data.
  All Known Implementing Classes:
    CacheBasedDatasetBuilder, LocalDatasetBuilder, SqlDatasetBuilder

      public interface DatasetBuilder<K,V>

  A builder constructing instances of a `Dataset`. Implementations of this interface encapsulate logic of building specific datasets such as allocation required data structures and initialization of `context` part of partitions.
  See Also:
    `CacheBasedDatasetBuilder`, `LocalDatasetBuilder`, `Dataset`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<C extends Serializable,D extends AutoCloseable> Dataset<C,D>` | `build(LearningEnvironmentBuilder envBuilder, PartitionContextBuilder<K,V,C> partCtxBuilder, PartitionDataBuilder<K,V,C,D> partDataBuilder, LearningEnvironment localLearningEnv)` Constructs a new instance of `Dataset` that includes allocation required data structures and initialization of `context` part of partitions.
    `DatasetBuilder<K,V>` | `withFilter(IgniteBiPredicate<K,V> filterToAdd)` Returns new instance of DatasetBuilder using conjunction of internal filter and `filterToAdd`.
    `DatasetBuilder<K,V>` | `withUpstreamTransformer(UpstreamTransformerBuilder builder)` Returns new instance of `DatasetBuilder` with new `UpstreamTransformerBuilder` added to chain of upstream transformer builders.

- - ### Method Detail

    - #### build

          <C extends Serializable,D extends AutoCloseable> Dataset<C,D> build(LearningEnvironmentBuilder envBuilder,
                                                                              PartitionContextBuilder<K,V,C> partCtxBuilder,
                                                                              PartitionDataBuilder<K,V,C,D> partDataBuilder,
                                                                              LearningEnvironment localLearningEnv)

      Constructs a new instance of `Dataset` that includes allocation required data structures and initialization of `context` part of partitions.
      Type Parameters:
        `C` - Type of a partition `context`.
        `D` - Type of a partition `data`.
      Parameters:
        `envBuilder` - Learning environment builder.
        `partCtxBuilder` - Partition `context` builder.
        `partDataBuilder` - Partition `data` builder.
        `localLearningEnv` - Local learning environment.
      Returns:
        Dataset.

    - #### withUpstreamTransformer

          DatasetBuilder<K,V> withUpstreamTransformer(UpstreamTransformerBuilder builder)

      Returns new instance of `DatasetBuilder` with new `UpstreamTransformerBuilder` added to chain of upstream transformer builders. When needed, each builder in chain first transformed into `UpstreamTransformer`, those are in turn composed together one after another forming final `UpstreamTransformer`. This transformer is applied to upstream data before it is passed to `PartitionDataBuilder` and `PartitionContextBuilder`. This is needed to allow transformation to upstream data which are agnostic of any changes that happen after. Such transformations may be used for deriving meta-algorithms such as bagging (see `BaggingUpstreamTransformer`).
      Returns:
        Returns new instance of `DatasetBuilder` with new `UpstreamTransformerBuilder` added to chain of upstream transformer builders.

    - #### withFilter

          DatasetBuilder<K,V> withFilter(IgniteBiPredicate<K,V> filterToAdd)

      Returns new instance of DatasetBuilder using conjunction of internal filter and `filterToAdd`.
      Parameters:
        `filterToAdd` - Additional filter.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021