org.apache.ignite.ml.optimization

## Interface SmoothParametrized<M extends Parametrized<M>>

- All Superinterfaces:
    AutoCloseable, IgniteModel<Matrix,Matrix>, Model<Matrix,Matrix>, Parametrized<M>, Serializable
  All Known Implementing Classes:
    MultilayerPerceptron

      public interface SmoothParametrized<M extends Parametrized<M>>
      extends Parametrized<M>, IgniteModel<Matrix,Matrix>

  Interface for models which are smooth functions of their parameters.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vector` | `differentiateByParameters(IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss, Matrix inputsBatch, Matrix truthBatch)` Compose function in the following way: feed output of this model as input to second argument to loss function.
    `Vector` | `parameters()` Get parameters vector.
    `int` | `parametersCount()` Get count of parameters of this model.
    `M` | `setParameters(Vector vector)` Set parameters.
    `default M` | `withParameters(Vector vector)` Return new model with given parameters vector.

    - ### Methods inherited from interface org.apache.ignite.ml.IgniteModel

      `andBefore, andThen, andThen, close, combine, toString`

    - ### Methods inherited from interface org.apache.ignite.ml.inference.Model

      `predict`

- - ### Method Detail

    - #### differentiateByParameters

          Vector differentiateByParameters(IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss,
                                           Matrix inputsBatch,
                                           Matrix truthBatch)

      Compose function in the following way: feed output of this model as input to second argument to loss function. After that we have a function g of three arguments: input, ground truth, parameters. If we consider function h(w) = 1 / M sum_{i=1}^{M} g(w, input_i, groundTruth_i), where M is number of entries in batch, we get function of one argument: parameters vector w. This function is being differentiated.
      Parameters:
        `loss` - Loss function.
        `inputsBatch` - Batch of inputs.
        `truthBatch` - Batch of ground truths.
      Returns:
        Gradient of h at current point in parameters space.

    - #### parameters

          Vector parameters()

      Get parameters vector.
      Returns:
        Parameters vector.

    - #### setParameters

          M setParameters(Vector vector)

      Set parameters.
      Parameters:
        `vector` - Parameters vector.

    - #### withParameters

          default M withParameters(Vector vector)

      Return new model with given parameters vector.
      Parameters:
        `vector` - Parameters vector.

    - #### parametersCount

          int parametersCount()

      Get count of parameters of this model.
      Returns:
        Count of parameters of this model.

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