API call to get quality metrics produced by the lookalike modeling system.
Lookalike modeling is based on machine learning models. The quality of the ML models are evaluated every time the models are trained on new data, which is done once every 24 hours on average. The resulting metrics can be accessed through this API.
The reported precision score should be compared to the baseline score of random sampling when evaluating quality. A baseline score of f.ex. 50% means that the model was trained on two equally sized classes and that you could expect 50% precision if you picked a class for each user randomly. In that case the precision of the lookalike model should be considered good if it is 75% or better. See Lookalike Quality for tips on how to improve the model quality.
The user must be authenticated and have read permissions to the site group.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
Return quality metrics for the given segment. |
|
|
String |
No |
Return quality metrics for all lookalike-enabled segments for the given sitegroup. |
If no parameters are given, the request will return quality metrics for all lookalike-enabled segments the user has access to.
Response
The response object for a successful query has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of object |
Array of lookalike quality objects |
A lookalike quality object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The identifier for the segment. |
|
|
String |
The site group identifier to which this segment belongs. |
|
|
Number |
The precision score as a number between 0 and 1. |
|
|
Number |
The baseline score of random sampling, as a number between 0 and 1. |
|
|
String |
The time the values were last updated. ISO8601 extended datetime format with time zone (example: "2018-01-01T11:22:33+0000"). |
|
|
String |
The confusion matrix |
Examples
$ python cx.py /segment/lookalike/quality '{"siteGroupId":"567890"}'
{
"segments": [
{
"id": "1234",
"siteGroupId": "567890",
"precision": 0.8,
"baseline": 0.5,
"lastUpdated": "2018-01-01T11:22:33+0000"
},
{
"id": "3456",
"siteGroupId": "567890",
"precision": 0.74,
"baseline": 0.2,
"lastUpdated": "2018-01-01T12:33:44+0000",
"confusionMatrix": [['segment1', '100', '300'],['segment2', '200', '400']]
}
]
}