Data Science Workspace is no longer available for purchase.
This documentation is intended for existing customers with prior entitlements to Data Science Workspace.
Insights contain metrics which are used to empower a data scientist to evaluate and choose optimal ML models by displaying relevant evaluation metrics.
You can retrieve a list of Insights by performing a single GET request to the insights endpoint. To help filter results, you can specify query parameters in the request path. For a list of available queries, refer to the appendix section on query parameters for asset retrieval.
API Format
GET /insights
Request
curl -X GET \
https://platform.adobe.io/data/sensei/insights \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns a payload that includes a list of insights and each insight has unique identifier ( id
). Additionally, you will receive context
which contains the unique identifiers that are associated with that particular insight following with the Insights events and metrics data.
{
"children": [
{
"id": "08b8d174-6b0d-4d7e-acd8-1c4c908e14b2",
"context": {
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71"
},
"events": {
"name": "fit",
"eventValues": {
"algorithm": null,
"ratio": "0.8"
}
},
"metrics": [
{
"name": "MAPE",
"value": "0.0111111111111",
"valueType": "double"
}
],
"created": "2019-01-01T00:00:00.000Z",
"updated": "2019-01-02T00:00:00.000Z"
},
{
"id": "08b8d174-6b0d-4d7e-acd8-1c4c908e14b2",
"context": {
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71"
},
"events": {
"name": "fit",
"eventValues": {
"algorithm": null,
"ratio": "0.8"
}
},
"metrics": [
{
"name": "MAPE",
"value": "0.0111111111111",
"valueType": "double"
}
],
"created": "2019-01-01T00:00:00.000Z",
"updated": "2019-01-02T00:00:00.000Z"
}
],
"_page": {
"count": 2
}
}
Property | Description |
---|---|
id |
The ID corresponding to the Insight. |
experimentId |
A valid Experiment ID. |
experimentRunId |
A valid Experiment Run ID. |
modelId |
A valid Model ID. |
To look up a particular insight make a GET request and provide a valid {INSIGHT_ID}
in the request path. To help filter results, you can specify query parameters in the request path. For a list of available queries, refer to the appendix section on query parameters for asset retrieval.
API Format
GET /insights/{INSIGHT_ID}
Parameter | Description |
---|---|
{INSIGHT_ID} |
The unique identifier of a Sensei insight. |
Request
curl -X GET \
https://platform.adobe.io/data/sensei/insights/08b8d174-6b0d-4d7e-acd8-1c4c908e14b2 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns a payload that includes the insights unique identifier (id
). Additionally you will receive context
which contains the unique identifiers that are associated with the particular insight following with the Insights events and metrics data.
{
"id": "08b8d174-6b0d-4d7e-acd8-1c4c908e14b2",
"context": {
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71"
},
"events": {
"name": "fit",
"eventValues": {
"algorithm": null,
"ratio": "0.8"
}
},
"metrics": [
{
"name": "MAPE",
"value": "0.0111111111111",
"valueType": "double"
}
],
"created": "2019-01-01T00:00:00.000Z",
"updated": "2019-01-02T00:00:00.000Z"
}
Property | Description |
---|---|
id |
The ID corresponding to the Insight. |
experimentId |
A valid Experiment ID. |
experimentRunId |
A valid Experiment Run ID. |
modelId |
A valid Model ID. |
You can create a new Model insight by performing a POST request and a payload that provides context, events,and metrics for the new Model insight. The context field used to create a new Model insight is not required to have existing services attached to it but you can choose to create the new Model insight with existing services by providing one or more of the corresponding IDs:
"context": {
"clientId": "f1ab3164-e688-433d-99ef-077b2be84731",
"notebookId": "T4ab3164-e658-443d-97ef-022b2be84999",
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"engineId": "22f4166f-85ba-4130-a995-a2b8e1edde32",
"mlInstanceId": "46986c8f-7739-4376-8509-0178bdf32cda",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71",
"dataSetId": "5ee3cd7f2d34011913c56941"
}
API Format
POST /insights
Request
curl -X POST \
https://platform.adobe.io/data/sensei/insights \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
-H `Content-Type: application/vnd.adobe.platform.sensei+json;profile=mlInstance.v1.json`
-d {
"context": {
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71"
},
"events": {
"name": "fit2",
"eventValues": {
"algorithm": null,
"ratio": "0.99"
}
},
"metrics": [
{
"name": "MAPE2",
"value": "0.11111111111",
"valueType": "double"
}
],
"created": "2019-01-01T00:00:00.000Z",
"updated": "2019-01-02T00:00:00.000Z"
}
Response
A successful response will return a payload that has an {INSIGHT_ID}
and any parameters that you provided in the initial request.
{
"id": "08b8d174-6b0d-4d7e-acd8-1c4c908e14b2",
"context": {
"experimentId": "5cb25a2d-2cbd-4c99-a619-8ddae5250a7b",
"experimentRunId": "33408593-2871-4198-a812-6d1b7d939cda",
"modelId": "15c53796-bd6b-4e09-b51d-7296aa20af71"
},
"events": {
"name": "fit2",
"eventValues": {
"algorithm": null,
"ratio": "0.99"
}
},
"metrics": [
{
"name": "MAPE2",
"value": "0.11111111111",
"valueType": "double"
}
],
"created": "2019-01-01T00:00:00.000Z",
"updated": "2019-01-02T00:00:00.000Z"
}
Property | Description |
---|---|
insightId |
The unique ID that is created for this particular insight when a successful POST request is made. |
You can retrieve a list of all your algorithm’s and default metrics by performing a single GET request to the metrics endpoint. To query a particular metric make a GET request and provide a valid {ALGORITHM}
in the request path.
API Format
GET /insights/metrics
GET /insights/metrics?algorithm={ALGORITHM}
Parameter | Description |
---|---|
{ALGORITHM} |
The identifier of the algorithm type. |
Request
The following request contains a query and retrieves a specific metric by using the algorithm identifier {ALGORITHM}
curl -X GET \
'https://platform.adobe.io/data/sensei/insights/metrics?algorithm={ALGORITHM}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns a payload that includes the algorithm
unique identifier and an array of default metrics.
{
"children": [
{
"algorithm": "15c53796-bd6b-4e09-b51d-7296aa20af71",
"defaultMetrics": [
"f-score",
"auroc",
"roc",
"precision",
"recall",
"accuracy",
"confusion matrix"
]
}
]
}