SegmentML Create
Create a new SegmentML model.
Model configuration can be specified either through sending the options as a flat JSON object POST body or through URL parameters on the request.
# Curl example of creating a SegmentML model
curl -s -J -XPOST "https://api.lytics.io/api/segmentml" -H "Authorization: $LIOKEY" -d '
{
"source": "all",
"target": "smt_power",
"use_scores": true
}
'
Request
- Base URLhttps://api.lytics.io
- URLhttps://api.lytics.io/api/segmentml
- AuthAPI key in header Authorization
Query parameters
Your Lytics account ID.
ID or slug of the source segment.
ID or slug of the target segment. Required if target field is not supplied.
Include raw behavioral scores as features in the model (usually very useful).
Slug of the target field. Cannot provide both a target and a target field, hence required if target segment is not indicated (see above).
If true, include content affinities as features in the model.
List of Segment Collections to include in the model. Possible values are "email", "web", "support", "mobile", "commerce", "behaviors", "content".
List of additional user fields to include in the model.
Build the model without scoring each user. This is useful during model building exercises when comparing efficiency and accuracy between models. Set true by default unless evalonly is selected.
If true, a previously built model is used to rescore users. Only the source and target parameters are needed in the API call to to identify which model to use.
If true, enable auto-tune feature selection.
If true, model tuning parameters are optimized before any models are built. Experimental.
Includes tags to be associated with the model.
If true, re-run the model every week.
If true, this saves three different segments: 1) Users from source and target segments who "look like" users from the target segment. 2) Users not in the target segment. 3) Users from the source segment who look like users from the target segment.
If true, do not remove any of the model features when creating the model.
The number of samples to collect from both the source and target segment for feature matrices. Defaults to 5,000.
Threshold (0.0-1.0) at which to remove correlated features.
Response
Created
Example response
{
"name": "test_rf",
"state": "building",
"reason": "",
"created": "2018-07-10T16:10:54.456003352-07:00",
"conf": {
"source": {
"aid": 123,
"account_id": "lol",
"id": "",
"name": "all",
"is_public": false,
"slug_name": "",
"description": "",
"author_id": "",
"updated": "0001-01-01T00:00:00Z",
"created": "2018-07-10T16:10:54.442558895-07:00",
"invalid": false,
"invalid_reason": "",
"deleted": false,
"datemath_calc": false,
"forward_datemath": false,
"save_hist": false,
"schedule_exit": false,
"tags": null
},
"target": {
"aid": 123,
"account_id": "lol",
"id": "",
"name": "goal",
"is_public": false,
"slug_name": "",
"description": "",
"author_id": "",
"updated": "0001-01-01T00:00:00Z",
"created": "2018-07-10T16:10:54.442559277-07:00",
"invalid": false,
"invalid_reason": "",
"deleted": false,
"datemath_calc": false,
"forward_datemath": false,
"save_hist": false,
"schedule_exit": false,
"tags": null
},
"target_field": null,
"model_name": "",
"additional": null,
"collections": null,
"collect": 0,
"use_scores": true,
"use_content": false,
"build_only": false,
"auto_tune": false
}
}Changes
No recorded changes to this operation across all 1 revision of this API.