org.apache.ignite.ml.pipeline

## Class Pipeline<K,V,C extends Serializable,L>

- java.lang.Object
- - org.apache.ignite.ml.pipeline.Pipeline<K,V,C,L>

- Type Parameters:
    `K` - Type of a key in `upstream` data.
    `V` - Type of a value in `upstream` data.
  All Implemented Interfaces:
    Serializable

      public class Pipeline<K,V,C extends Serializable,L>
      extends Object
      implements Serializable

  A simple pipeline, which acts as a global trainer which produce a Pipeline Model. A Pipeline consists of a sequence of stages, each of which is either a Preprocessing Stage or a Trainer. When `fit()` method is called, the stages are executed in order.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Pipeline()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Pipeline<K,V,C,L>` | `addPreprocessingTrainer(PreprocessingTrainer preprocessingTrainer)` Adds a preprocessor.
    `Pipeline<K,V,C,L>` | `addTrainer(DatasetTrainer trainer)` Adds a trainer.
    `Pipeline<K,V,C,L>` | `addVectorizer(Vectorizer<K,V,C,L> vectorizer)`
    `PipelineMdl<K,V>` | `fit(DatasetBuilder datasetBuilder)` Fits the pipeline to the input dataset builder.
    `PipelineMdl<K,V>` | `fit(Ignite ignite, IgniteCache<K,V> cache)` Fits the pipeline to the input cache.
    `PipelineMdl<K,V>` | `fit(Map<K,V> data, int parts)` Fits the pipeline to the input mock data.
    `Preprocessor<K,V>` | `getFinalPreprocessor()` Returns the final preprocessor for evaluation needs.
    `DatasetTrainer` | `getTrainer()` Returns trainer.
    `void` | `setEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)` Set learning environment builder.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Pipeline

          public Pipeline()

  - ### Method Detail

    - #### addVectorizer

          public Pipeline<K,V,C,L> addVectorizer(Vectorizer<K,V,C,L> vectorizer)

      Parameters:
        `vectorizer` - Vectorizer.

    - #### addPreprocessingTrainer

          public Pipeline<K,V,C,L> addPreprocessingTrainer(PreprocessingTrainer preprocessingTrainer)

      Adds a preprocessor.
      Parameters:
        `preprocessingTrainer` - The parameter value.
      Returns:
        The updated Pipeline.

    - #### addTrainer

          public Pipeline<K,V,C,L> addTrainer(DatasetTrainer trainer)

      Adds a trainer.
      Parameters:
        `trainer` - The parameter value.
      Returns:
        The updated Pipeline.

    - #### getTrainer

          public DatasetTrainer getTrainer()

      Returns trainer.

    - #### fit

          public PipelineMdl<K,V> fit(Ignite ignite,
                                      IgniteCache<K,V> cache)

      Fits the pipeline to the input cache.
      Parameters:
        `ignite` - Ignite instance.
        `cache` - Ignite cache with `upstream` data.
      Returns:
        The fitted model based on chain of preprocessors and final trainer.

    - #### setEnvironmentBuilder

          public void setEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)

      Set learning environment builder.
      Parameters:
        `envBuilder` - Learning environment builder.

    - #### fit

          public PipelineMdl<K,V> fit(Map<K,V> data,
                                      int parts)

      Fits the pipeline to the input mock data.
      Parameters:
        `data` - Data.
        `parts` - Number of partitions.
      Returns:
        The fitted model based on chain of preprocessors and final trainer.

    - #### fit

          public PipelineMdl<K,V> fit(DatasetBuilder datasetBuilder)

      Fits the pipeline to the input dataset builder.

    - #### getFinalPreprocessor

          public Preprocessor<K,V> getFinalPreprocessor()

      Returns the final preprocessor for evaluation needs.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023