Compute Process – Run

This API is called to invoke the recommendation rating computation process in the recommendation engine. The goal is to input a CSV file containing the known ratings for various items by subscribers and compute their expected ratings for all the assets. The computed rating data is stored as a CSV file and the access URL is returned on completion.

POST DATA:

Notes:

  • RatingAlgorithm:
    “CF_strict”: Collaborative Filtering using ALS with a target error of 0.01
    “CF_lenient”: Collaborative Filtering using ALS with a target error of 0.10
    “CF_Tags_strict”: Collaborative Filtering on tags using ALS with a target error of 0.01
    “CF_Tags_lenient”: Collaborative Filtering on tags using ALS with a target error of 0.10

  • RatingData:
    This field contains the URL from where the CSV file for the rating data can be retrieved. Ideally this is the URL returned as processed_file on completion of the Encode process.
    In the CSV File, each row has these fields: userId, itemId, rating
    userId: string
    itemId: string
    rating: float

  • Catalog:
    This is the CSV-formatted info about assets in the system.
    Each row in the CSV file has these fields: itemId, tags, type, seriesId, duration
    itemId: string
    tags: pipe-separated list of tags
    type: string //vod, series, episode
    seriesId: string // in case the asset is an episode, this is the itemId of its series. Otherwise “”
    duration: int // runtime in seconds — for series it will be sum of runtime of all its episodes

  • On successful completion, a callback is made to specified Callback endpoint and following JSON is POSTed:

    The final file is stored at the provided “output_url” with each row in the CSV file having the fields: userId,itemId,rating
    userId: string
    itemId: string
    rating: float

    In case of failure, a JSON with error message is POST to the callback endpoint:

Resource URL

POST - /compute/run

Example Request URL

POST - http://__JTV_HOST__/compute/run

Example Return

On success: On error: