org.apache.ignite.ml.composition.stacking

## Class StackedModel<IS,IA,O,AM extends IgniteModel<IA,O>>

- java.lang.Object
- - org.apache.ignite.ml.composition.stacking.StackedModel<IS,IA,O,AM>

- Type Parameters:
    `IS` - Type of submodels input.
    `IA` - Type of submodels output (same as aggregator model input).
    `O` - Type of aggregator model output.
    `AM` - Type of aggregator model.
  All Implemented Interfaces:
    Serializable, AutoCloseable, IgniteModel<IS,O>, Model<IS,O>

      public final class StackedModel<IS,IA,O,AM extends IgniteModel<IA,O>>
      extends Object
      implements IgniteModel<IS,O>

  This is a wrapper for model produced by `StackedDatasetTrainer`. Model consisting of two layers:

           1. Submodels layer  (IS -> IA).
           2. Aggregator layer  (IA -> O).

  Submodels layer is a `ModelsParallelComposition` of several models `IS -> IA` each of them getting same input `IS` and produce own output, these outputs outputs `[IA]` are combined into a single output with a given binary "merger" operator `IA -> IA -> IA`. Result of merge is then passed to the aggregator layer. Aggregator layer consists of a model `IA -> O`.
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `O` | `predict(IS is)` Make a prediction for the specified input arguments.

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

      `andBefore, andThen, andThen, combine, toString`

- - ### Method Detail

    - #### predict

          public O predict(IS is)

      Make a prediction for the specified input arguments.
      Specified by:
        `predict` in interface `Model<IS,O>`
      Parameters:
        `is` - Input arguments.
      Returns:
        Prediction result.

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `IgniteModel<IS,O>`
      Specified by:
        `close` in interface `Model<IS,O>`

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