This documentation will explain how to compute recommendations in order to use them in a productive environment.

Similar to the connection of a data source, there are two ways to compute recommendations.

  1. Manually calling the requests
  2. With the help of the portal

Also, recommenders can be distinguish between 3 different states: AVAILABLE, TRAINING & READY.

  • AVAILABLE recommenders are recommender builder instances that allows you to train a recommender with different configurations (e.g. different data sources).
  • TRAINING recommenders are currently training a specific recommender with a specific configurations
  • READY recommenders are fully trained and can be used.

Manually

You can initialize a recommender manually by sending a PUT request with all necessary parameters. Each recommender configuration differs and, therefore, we suggest to call first a GET request of the recommender you want to connect, in order to get the configuration of the recommender. Go to the Swagger documentation for a full documentation of the REST API.

Example: Connect a k-Nearest Neighbor Recommender with Cosine similarity

Get the configuration

GET: HOST/train/rec-builder-cosine-user-knn

Show response data

{
  "configuration": [
    {
      "description": "",
      "key": "minOverlap",
      "options": [
        ""
      ],
      "requirement": "Optional",
      "type": "Integer",
      "value": "3"
    },
    {
      "description": "",
      "key": "minSimilarity",
      "options": [
        ""
      ],
      "requirement": "Optional",
      "type": "Integer",
      "value": "0.0"
    },
    {
      "description": "",
      "key": "id",
      "options": [],
      "requirement": "Required",
      "type": "String",
      "value": "cosine-user-knn"
    },
    {
      "description": "",
      "key": "maxNeighbors",
      "options": [
        ""
      ],
      "requirement": "Optional",
      "type": "Integer",
      "value": "10"
    },
    {
      "description": "",
      "key": "rec-builder-id",
      "options": [],
      "requirement": "Hidden",
      "type": "String",
      "value": "cosine-user-knn"
    },
    {
      "description": "",
      "key": "source-id",
      "options": [
        "mysql"
      ],
      "requirement": "Required",
      "type": "Options",
      "value": ""
    }
  ],
  "description": "",
  "id": "rec-builder-cosine-user-knn",
  "key": "cosine-user-knn",
  "state": "AVAILABLE"
}

Hidden content goes here

Connect the recommender

PUT: HOST/train

Show example request data

id=cosine-user-knn
rec-builder-id=cosine-user-knn
source-id=mysql

Portal

You can connect a data source by using the portal. You can find the portal by following this link.

To connect a data source with the help of the portal, you have to perform the following steps:

  1. Go to Recommender -> Available Recommender
  2. Click on the recommender that you want to connect
  3. Click the green “+” Button
  4. Fill the configuration form and submit it
  5. Done