org.apache.ignite.ml.environment

## Class DefaultLearningEnvironmentBuilder

- java.lang.Object
- - org.apache.ignite.ml.environment.DefaultLearningEnvironmentBuilder

- All Implemented Interfaces:
    Serializable, LearningEnvironmentBuilder

      public class DefaultLearningEnvironmentBuilder
      extends Object
      implements LearningEnvironmentBuilder

  Builder for `LearningEnvironment`.
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LearningEnvironment` | `buildForWorker(int part)` Builds `LearningEnvironment` for worker on given partition.
    `LearningEnvironmentBuilder` | `withDataTtl(long dataTtl)` Specify partition data time-to-live in seconds (-1 for an infinite lifetime).
    `DefaultLearningEnvironmentBuilder` | `withLoggingFactoryDependency(IgniteFunction<Integer,MLLogger.Factory> loggingFactory)` Specify dependency (partition -> logging factory).
    `DefaultLearningEnvironmentBuilder` | `withParallelismStrategyDependency(IgniteFunction<Integer,ParallelismStrategy> stgy)` Specifies dependency (partition -> Parallelism Strategy for LearningEnvironment).
    `DefaultLearningEnvironmentBuilder` | `withParallelismStrategyTypeDependency(IgniteFunction<Integer,ParallelismStrategy.Type> stgyType)` Specifies dependency (partition -> Parallelism Strategy Type for LearningEnvironment).
    `LearningEnvironmentBuilder` | `withRandomDependency(IgniteFunction<Integer,Random> rngSupplier)` Specify dependency (partition -> random numbers generator).
    `LearningEnvironmentBuilder` | `withRNGSeedDependency(IgniteFunction<Integer,Long> seed)` Specify dependency (partition -> seed for random number generator).

    - ### 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.environment.LearningEnvironmentBuilder

      `buildForTrainer, defaultBuilder, withLoggingFactory, withParallelismStrategy, withParallelismStrategyType, withRandom, withRNGSeed`

- - ### Method Detail

    - #### withRNGSeedDependency

          public LearningEnvironmentBuilder withRNGSeedDependency(IgniteFunction<Integer,Long> seed)

      Specify dependency (partition -> seed for random number generator). Same seed will be used for all partitions.
      Specified by:
        `withRNGSeedDependency` in interface `LearningEnvironmentBuilder`
      Parameters:
        `seed` - Function describing dependency (partition -> seed for random number generator).
      Returns:
        This object.

    - #### withRandomDependency

          public LearningEnvironmentBuilder withRandomDependency(IgniteFunction<Integer,Random> rngSupplier)

      Specify dependency (partition -> random numbers generator).
      Specified by:
        `withRandomDependency` in interface `LearningEnvironmentBuilder`
      Parameters:
        `rngSupplier` - Function describing dependency (partition -> random numbers generator).
      Returns:
        This object.

    - #### withDataTtl

          public LearningEnvironmentBuilder withDataTtl(long dataTtl)

      Specify partition data time-to-live in seconds (-1 for an infinite lifetime).
      Specified by:
        `withDataTtl` in interface `LearningEnvironmentBuilder`
      Parameters:
        `dataTtl` - Partition data time-to-live in seconds (-1 for an infinite lifetime).
      Returns:
        This object.

    - #### withParallelismStrategyDependency

          public DefaultLearningEnvironmentBuilder withParallelismStrategyDependency(IgniteFunction<Integer,ParallelismStrategy> stgy)

      Specifies dependency (partition -> Parallelism Strategy for LearningEnvironment).
      Specified by:
        `withParallelismStrategyDependency` in interface `LearningEnvironmentBuilder`
      Parameters:
        `stgy` - Function describing dependency (partition -> Parallelism Strategy).
      Returns:
        This object.

    - #### withParallelismStrategyTypeDependency

          public DefaultLearningEnvironmentBuilder withParallelismStrategyTypeDependency(IgniteFunction<Integer,ParallelismStrategy.Type> stgyType)

      Specifies dependency (partition -> Parallelism Strategy Type for LearningEnvironment).
      Specified by:
        `withParallelismStrategyTypeDependency` in interface `LearningEnvironmentBuilder`
      Parameters:
        `stgyType` - Function describing dependency (partition -> Parallelism Strategy Type).
      Returns:
        This object.

    - #### withLoggingFactoryDependency

          public DefaultLearningEnvironmentBuilder withLoggingFactoryDependency(IgniteFunction<Integer,MLLogger.Factory> loggingFactory)

      Specify dependency (partition -> logging factory).
      Specified by:
        `withLoggingFactoryDependency` in interface `LearningEnvironmentBuilder`
      Parameters:
        `loggingFactory` - Function describing (partition -> logging factory).
      Returns:
        This object.

    - #### buildForWorker

          public LearningEnvironment buildForWorker(int part)

      Builds `LearningEnvironment` for worker on given partition.
      Specified by:
        `buildForWorker` in interface `LearningEnvironmentBuilder`
      Parameters:
        `part` - Partition.
      Returns:
        `LearningEnvironment` for worker on given partition.

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