org.apache.ignite.ml.multiclass

## Class MultiClassModel<M extends IgniteModel<Vector,Double>>

- java.lang.Object
- - org.apache.ignite.ml.multiclass.MultiClassModel<M>

- All Implemented Interfaces:
    Serializable, AutoCloseable, Exportable<MultiClassModel>, IgniteModel<Vector,Double>, Model<Vector,Double>

      public final class MultiClassModel<M extends IgniteModel<Vector,Double>>
      extends Object
      implements IgniteModel<Vector,Double>, Exportable<MultiClassModel>

  Base class for multi-classification model for set of classifiers.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiClassModel()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(double clsLb, M mdl)` Adds a specific binary classifier to the bunch of same classifiers.
    `boolean` | `equals(Object o)`
    `Optional<M>` | `getModel(Double clsLb)`
    `int` | `hashCode()`
    `Double` | `predict(Vector input)` Make a prediction for the specified input arguments.
    `<P> void` | `saveModel(Exporter<MultiClassModel,P> exporter, P path)` Save model by the given path.
    `String` | `toString()`
    `String` | `toString(boolean pretty)`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

      `andBefore, andThen, andThen, close, combine`

- - ### Constructor Detail

    - #### MultiClassModel

          public MultiClassModel()

  - ### Method Detail

    - #### add

          public void add(double clsLb,
                          M mdl)

      Adds a specific binary classifier to the bunch of same classifiers.
      Parameters:
        `clsLb` - The class label for the added model.
        `mdl` - The model.

    - #### getModel

          public Optional<M> getModel(Double clsLb)

      Parameters:
        `clsLb` - Class label.
      Returns:
        Model for class label if it exists.

    - #### predict

          public Double predict(Vector input)

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

    - #### saveModel

          public <P> void saveModel(Exporter<MultiClassModel,P> exporter,
                                    P path)

      Save model by the given path.
      Specified by:
        `saveModel` in interface `Exportable<MultiClassModel>`
      Parameters:
        `exporter` - Exporter.
        `path` - Path to saved model.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(boolean pretty)

      Specified by:
        `toString` in interface `IgniteModel<Vector,Double>`
      Parameters:
        `pretty` - Use pretty mode.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021