org.apache.ignite.ml.nn

## Class UpdatesStrategy<M,U extends Serializable>

- java.lang.Object
- - org.apache.ignite.ml.nn.UpdatesStrategy<M,U>

- Type Parameters:
    `M` - Type of model to be optimized.
    `U` - Type of update.

      public class UpdatesStrategy<M,U extends Serializable>
      extends Object

  Class encapsulating update strategies for group trainers based on updates.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpdatesStrategy(ParameterUpdateCalculator<M,U> updatesCalculator, IgniteFunction<List<U>,U> locStepUpdatesReducer, IgniteFunction<List<U>,U> allUpdatesReducer)` Construct instance of this class with given parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IgniteFunction<List<U>,U>` | `allUpdatesReducer()` Get function used to reduce updates from different trainings (for example, averaging of gradients of all parallel trainings).
    `ParameterUpdateCalculator<M,U>` | `getUpdatesCalculator()` Get parameter update calculator (see `ParameterUpdateCalculator`).
    `IgniteFunction<List<U>,U>` | `locStepUpdatesReducer()` Get function used to reduce updates in one training (for example, sum all sequential gradient updates to get one gradient update).

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

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

- - ### Constructor Detail

    - #### UpdatesStrategy

          public UpdatesStrategy(ParameterUpdateCalculator<M,U> updatesCalculator,
                                 IgniteFunction<List<U>,U> locStepUpdatesReducer,
                                 IgniteFunction<List<U>,U> allUpdatesReducer)

      Construct instance of this class with given parameters.
      Parameters:
        `updatesCalculator` - Parameter update calculator.
        `locStepUpdatesReducer` - Function used to reduce updates in one training (for example, sum all sequential gradient updates to get one gradient update).
        `allUpdatesReducer` - Function used to reduce updates from different trainings (for example, averaging of gradients of all parallel trainings).

  - ### Method Detail

    - #### getUpdatesCalculator

          public ParameterUpdateCalculator<M,U> getUpdatesCalculator()

      Get parameter update calculator (see `ParameterUpdateCalculator`).
      Returns:
        Parameter update calculator.

    - #### locStepUpdatesReducer

          public IgniteFunction<List<U>,U> locStepUpdatesReducer()

      Get function used to reduce updates in one training (for example, sum all sequential gradient updates to get one gradient update).
      Returns:
        Function used to reduce updates in one training (for example, sum all sequential gradient updates to get on gradient update).

    - #### allUpdatesReducer

          public IgniteFunction<List<U>,U> allUpdatesReducer()

      Get function used to reduce updates from different trainings (for example, averaging of gradients of all parallel trainings).
      Returns:
        Function used to reduce updates from different trainings.

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