org.apache.ignite.ml.recommendation

## Class RecommendationModel<O extends Serializable,S extends Serializable>

- java.lang.Object
- - org.apache.ignite.ml.recommendation.RecommendationModel<O,S>

- Type Parameters:
    `O` - Type of an object of recommendation.
    `S` - Type of a subject of recommendation.
  All Implemented Interfaces:
    Serializable, AutoCloseable, IgniteModel<ObjectSubjectPair<O,S>,Double>, Model<ObjectSubjectPair<O,S>,Double>

      public class RecommendationModel<O extends Serializable,S extends Serializable>
      extends Object
      implements IgniteModel<ObjectSubjectPair<O,S>,Double>

  Recommendation model that predicts rating for `ObjectSubjectPair`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RecommendationModel(Map<O,Vector> objMatrix, Map<S,Vector> subjMatrix)` Constructs a new instance of recommendation model.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<O,Vector>` | `getObjMatrix()`
    `Map<S,Vector>` | `getSubjMatrix()`
    `Double` | `predict(ObjectSubjectPair<O,S> input)` 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, close, combine, toString`

- - ### Constructor Detail

    - #### RecommendationModel

          public RecommendationModel(Map<O,Vector> objMatrix,
                                     Map<S,Vector> subjMatrix)

      Constructs a new instance of recommendation model.
      Parameters:
        `objMatrix` - Object of recommendation matrix.
        `subjMatrix` - Subject of recommendation matrix.

  - ### Method Detail

    - #### predict

          public Double predict(ObjectSubjectPair<O,S> input)

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

    - #### getObjMatrix

          public Map<O,Vector> getObjMatrix()

    - #### getSubjMatrix

          public Map<S,Vector> getSubjMatrix()

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023