org.apache.ignite.ml.environment

## Interface LearningEnvironment

-     public interface LearningEnvironment

  Specifies a set of utility-objects helpful at runtime but optional for learning algorithm (like thread pool for parallel learning in bagging model or logger).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static LearningEnvironment` | `DEFAULT_TRAINER_ENV` Default environment

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `dataTtl()` Returns partition data time-to-live in seconds (-1 for an infinite lifetime).
    `DeployingContext` | `deployingContext()` Returns deploy context instance.
    `default void` | `initDeployingContext(Object clientSideObj)` Initializes deploying context by object representing current client computation with classes unknown for server side.
    `MLLogger` | `logger()` Returns an instance of logger.
    `<T> MLLogger` | `logger(Class<T> forCls)` Returns an instance of logger for specific class.
    `ParallelismStrategy` | `parallelismStrategy()` Returns Parallelism Strategy instance.
    `int` | `partition()` Gets current partition.
    `Random` | `randomNumbersGenerator()` Random numbers generator.

- - ### Field Detail

    - #### DEFAULT_TRAINER_ENV

          static final LearningEnvironment DEFAULT_TRAINER_ENV

      Default environment

  - ### Method Detail

    - #### parallelismStrategy

          ParallelismStrategy parallelismStrategy()

      Returns Parallelism Strategy instance.

    - #### logger

          MLLogger logger()

      Returns an instance of logger.

    - #### randomNumbersGenerator

          Random randomNumbersGenerator()

      Random numbers generator.
      Returns:
        Random numbers generator.

    - #### logger

          <T> MLLogger logger(Class<T> forCls)

      Returns an instance of logger for specific class.
      Parameters:
        `forCls` - Logging class context.

    - #### partition

          int partition()

      Gets current partition. If this is called not in one of compute tasks of `Dataset`, will return -1.
      Returns:
        Partition.

    - #### dataTtl

          long dataTtl()

      Returns partition data time-to-live in seconds (-1 for an infinite lifetime).
      Returns:
        Partition data time-to-live in seconds (-1 for an infinite lifetime).

    - #### deployingContext

          DeployingContext deployingContext()

      Returns deploy context instance.
      Returns:
        Deploy context.

    - #### initDeployingContext

          default void initDeployingContext(Object clientSideObj)

      Initializes deploying context by object representing current client computation with classes unknown for server side.
      Parameters:
        `clientSideObj` - Client side object.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022