Recommender System

Overview

The model is based on the Neural Collaborative Filtering model. This model can be trained on a dataset containing users, items, ratings, and timestamps and make personalized item recommendations for a given user. Once trained, the input to the model is a user ID and the output is a list of recommended item IDs sorted by estimated propensity score, in descending order. For demo purposes this model has been trained on a subset of the MovieTweetings Dataset, containing 457 users with their IDs mapped from 0 to 457 for convenience.

Model Metadata

Domain Application Industry Framework Training Data Input Data Format
Information Retrieval Recommendations Commerce TensorFlow MovieTweetings CSV

References

Licenses

Component License Link
Model GitHub Repository Apache 2.0 LICENSE
Model Weights Apache 2.0 LICENSE
Model Code (3rd party) MIT Microsoft Recommender Systems GitHub Repo

Options available for deploying this model

This model can be deployed using the following mechanisms:

  • Deploy from Dockerhub:

    docker run -it -p 5000:5000 codait/max-recommender
    
  • Deploy on Red Hat OpenShift:

    Follow the instructions for the OpenShift web console or the OpenShift Container Platform CLI in this tutorial and specify codait/max-recommender as the image name.

  • Deploy on Kubernetes:

    kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Recommender/master/max-recommender.yaml
    
  • Locally: follow the instructions in the model README on GitHub

Options available for training this model

This model can be trained using the following mechanisms:

Example Usage

You can test or use this model

Test the model using cURL

Once deployed, you can test the model from the command line. For example if running locally:

$ curl -X POST "http://localhost:5000/model/predict?user_id=1&num_results=5" -H "accept: application/json"
{
  "status": "ok",
  "predictions": [
      {
      "user": "1",
      "item": "1454468",
      "prediction": 0.995230495929718
    },
    {
      "user": "1",
      "item": "1300854",
      "prediction": 0.9938176274299622
    },
    {
      "user": "1",
      "item": "77413",
      "prediction": 0.9930911064147949
    },
    {
      "user": "1",
      "item": "1731141",
      "prediction": 0.9929673671722412
    },
    {
      "user": "1",
      "item": "363226",
      "prediction": 0.9914621710777283
    }
  ]
}

Test the model in a serverless app

You can utilize this model in a serverless application by following the instructions in the Leverage deep learning in IBM Cloud Functions tutorial.