org.apache.ignite.ml.trainers

## Class AdaptableDatasetModel<I,O,IW,OW,M extends IgniteModel<IW,OW>>

- java.lang.Object
- - org.apache.ignite.ml.trainers.AdaptableDatasetModel<I,O,IW,OW,M>

- Type Parameters:
    `I` - Type of input of this model.
    `O` - Type of output of this model.
    `IW` - Type of input of inner model.
    `OW` - Type of output of inner model.
    `M` - Type of inner model.
  All Implemented Interfaces:
    Serializable, AutoCloseable, IgniteModel<I,O>, Model<I,O>

      public class AdaptableDatasetModel<I,O,IW,OW,M extends IgniteModel<IW,OW>>
      extends Object
      implements IgniteModel<I,O>

  Model which is composition of form `before `andThen` inner Mdl `andThen` after`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdaptableDatasetModel(IgniteFunction<I,IW> before, M mdl, IgniteFunction<OW,O> after)` Construct instance of this class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<I1> AdaptableDatasetModel<I1,O,IW,OW,M>` | `andBefore(IgniteFunction<I1,I> before)` Create new `AdaptableDatasetModel` which is a composition of the form `thisMdl . before`.
    `<O1> AdaptableDatasetModel<I,O1,IW,OW,M>` | `andThen(IgniteModel<O,O1> after)` Get a composition model of the form `x -> after(mdl(x))`.
    `M` | `innerModel()` Get inner model.
    `O` | `predict(I i)` Result of this model application is a result of composition `before `andThen` inner mdl `andThen` after`.
    `<M1 extends IgniteModel<IW,OW>> AdaptableDatasetModel<I,O,IW,OW,M1>` | `withInnerModel(M1 mdl)` Create new instance of this class with changed inner model.

    - ### 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.IgniteModel

      `andThen, close, combine, toString`

- - ### Constructor Detail

    - #### AdaptableDatasetModel

          public AdaptableDatasetModel(IgniteFunction<I,IW> before,
                                       M mdl,
                                       IgniteFunction<OW,O> after)

      Construct instance of this class.
      Parameters:
        `before` - Function applied before wrapped model.
        `mdl` - Inner model.
        `after` - Function applied after wrapped model.

  - ### Method Detail

    - #### predict

          public O predict(I i)

      Result of this model application is a result of composition `before `andThen` inner mdl `andThen` after`.
      Specified by:
        `predict` in interface `Model<I,O>`
      Parameters:
        `i` - Input arguments.
      Returns:
        Prediction result.

    - #### andThen

          public <O1> AdaptableDatasetModel<I,O1,IW,OW,M> andThen(IgniteModel<O,O1> after)

      Get a composition model of the form `x -> after(mdl(x))`.
      Specified by:
        `andThen` in interface `IgniteModel<I,O>`
      Type Parameters:
        `O1` - Type of output of function applied after this model.
      Parameters:
        `after` - Model to apply after this model.
      Returns:
        Composition model of the form `x -> after(mdl(x))`.

    - #### andBefore

          public <I1> AdaptableDatasetModel<I1,O,IW,OW,M> andBefore(IgniteFunction<I1,I> before)

      Create new `AdaptableDatasetModel` which is a composition of the form `thisMdl . before`.
      Specified by:
        `andBefore` in interface `IgniteModel<I,O>`
      Type Parameters:
        `I1` - Type of function applied before this model.
      Parameters:
        `before` - Function applied before this model.
      Returns:
        New `AdaptableDatasetModel` which is a composition of the form `thisMdl . before`.

    - #### innerModel

          public M innerModel()

      Get inner model.
      Returns:
        Inner model.

    - #### withInnerModel

          public <M1 extends IgniteModel<IW,OW>> AdaptableDatasetModel<I,O,IW,OW,M1> withInnerModel(M1 mdl)

      Create new instance of this class with changed inner model.
      Type Parameters:
        `M1` - Type of inner model.
      Parameters:
        `mdl` - Inner model.
      Returns:
        New instance of this class with changed inner model.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020