Docs
Modules
Spend Personality
API and Data Access

Spend Personality

Access Scores

once scores have been generated from static models or generated from dynamic models, you can access the scores and use them in other data sets. There are pre-defined API’s to use.

API’s can be used to access scores and use them in various situations.

API Parameters

When using the API to access scores, you will need to provide the following parameters:

Campaign

This is the same name as provided when configuring project deployment settings. For dynamic recommenders ensure that the names are the same.

Sub-Campaign

The sub-campaign can be used to differentiate between different models that are used in the same campaign. This is useful when using multiple models in the same campaign.

Lookup

If there is a parameter lookup configured, then this is the value that will be used to lookup the model scoring parameters. If there is no lookup configured, then this value will be ignored.

Channel

Different channels can be used to access the scores. This is useful when using the same model in different channels.

Responses

The number of responses to return. This is useful when using the API to return multiple scores. For data lookup options only one response is returned.

The in_param parameter

With the Score API Selected, use the following options for in_params.

Model based recommender:

{}

Note that this approach will bypass any parameter lookup settings in the project deployment configuration. Model based configurations that require data lookup replacement use:

{
  "input":["model_param1","model_param2"],
  "value":["value to score","value to score"]
}

Dynamic recommenders use:

{
  "input":["contextual_variable_one","contextual_variable_two"],
  "value":["",""]
}

Tensorflow or PyTorch models:

{
  "input":["text"],
  "value":["Place text here"],
  "type":"dense_1"
}

Question and answer approaches with deep learning models:

{
  "input":["text","question"],
  "value":["BBC Japan was a general entertainment Channel. Which operated between December 2004 and April 2006.","When did BBC Japan start broadcasting?"],
  "type":"qa"
}