[TRANSLATION ERROR] There are no messages for this key

Ensemble

The ensemble engine applies a mixing of many of the previous engines to make recommendations. The engine needs to be configured before using it to make recommendations, setting the engines to use and their weights.

Configure Ensemble engine

The ensemble configuration for the given table will be created/updated.

URL
POST /{tableId}/ensemble

Parameters

URL parameters:

ParameterMandatoryTypeDescription
tableIdStringID of the table

Fields to be included in the request body:

FieldMandatoryTypeDescription
dataArrayArray of engine configurations

Where the engine configuration is composed as:

FieldMandatoryTypeDescription
engineStringcontent_based, hybrid, fm, isvd or popular
valueDoubleThe weight for the engine

Example:

Create an ensemble configuration as:

EngineWeigth
ISVD75.0
FM20.0
Most popular5.0
{
    "data": [
        {
            "engine": "isvd",
            "value": 75.0
        },
        {
            "engine": "fm",
            "value": 20.0
        },
        {
            "engine": "popular",
            "value": 5.0
        }
    ]
}

Response

CodeName
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error
503Service Unavailable

Example

Configure the ensemble engine for movies table with the following engines and weights:

EngineWeigth
ISVD75.0
FM20.0
Most popular5.0
curl -X POST "https://recom.sherpa.ai/v2/recomm/movies/ensemble" \
-H  "Content-Type: application/json" \
-H  "X-Sherpa-apikey: XXXX-SHERPA-DELIVERED-PUBLIC-APIKEY-XXXX" \
-H  "X-Sherpa-timestamp: 1548084514112" \
-H  "X-Sherpa-nonce: XXXX-SHERPA-RANDOM-UUID-XXXX" \
-H  "X-Sherpa-hmac: xxxxyyyyyyy***signature******" \
-d  "{\"data\": [{\"engine\":\"isvd\",\"value\": 75.0},{\"engine\":\"fm\",\"value\":20.0},{\"engine\":\"popular\",\"value\":5.0}]}"