Model

更新时间:
复制 MD 格式

The Model object represents an OpenSearch application model, including its type, training configuration, behavioral data settings, and current training status.

Example

{
    "id": 113023,
    "groupId": "100297752",
    "groupName": "appGroupName",
    "type": "pop",
    "name": "pop_1212",
    "trainTarget": "ctr",
    "cron": "15 0 */2 * *",
    "cronEnabled": true,
    "behaviorEnabled": true,
    "behaviorFromGroupName": "DemoModelName",
    "lastTrainingTime": 1543233439000,
    "auc": 0.85,
    "status": "train_success",
    "progress": 69,
    "isAlreadyDeployed": true,
    "industry": "general",
    "filter": "user_id=1,level=1",
    "fields": [
        {
            "name": "item_title",
            "appFieldType": "title"
        },
        {
            "name": "item_content"
        },
        {
            "name": "item_title_keep",
            "processType": "reserve"
        }
    ],
    "extend": {
        "useHotQuery": true,
        "useHistoryQuery": true
    }
}

Structure

FieldTypeDescription
idIntegerThe ID of the model.
groupIdStringThe ID of the application.
groupNameStringThe name of the application.
typeStringThe type of the model. Valid values: pop (popularity model), cp (category prediction model), hot (top search model), hint (hint model), suggest (drop-down suggestions model).
nameStringThe name of the model. The name must match the regular expression /^(?!ops_)[a-zA-Z]\w{0,29}$/.
industryStringThe industry the model applies to. Valid values: general, ecommerce, content.
trainTargetStringThe training goal of the model. Valid values: click, buy, cart, collect, like, comment, share, subscribe, gift, download, read, tip.
behaviorEnabledBooleanSpecifies whether to use behavioral data. Default value: true. Not all model types support behavioral data.
behaviorFromGroupNameStringThe name of the application whose behavioral data is used. Defaults to the behavioral data of the current application.
cronStringThe CRON expression for scheduled training. For more information about CRON syntax, see the Linux Crontab documentation.
cronEnabledBooleanSpecifies whether scheduled training is enabled. Default value: true.
availableThresholdFloatThe threshold when the model is considered qualified. Valid values: 0 to 1.
filterStringThe filter conditions for data import. Supported operators: <, >, =, !=, >=, <=. Separate multiple conditions with commas (,).
fields[]ObjectThe fields used by the model.
fields[].nameStringThe name of the field.
fields[].appFieldTypeStringThe role of the field in the application. Valid values: pk (primary key), cate_id (category ID), title (title), cate_name (category name), normal (regular field).
fields[].processTypeStringThe processing type for the field. Valid values: reserve, normal.
lastTrainingTimeIntegerThe timestamp of the most recent completed training.
lastModifyTimeIntegerThe timestamp of the most recent modification to the model.
aucFloatThe area under curve (AUC) value of the model.
statusStringThe training status of the model. Valid values: train_init (waiting to be trained), train_pending (training in progress), validate_failed (a data exception occurred), train_failed (training failed), train_bad_model (training completed but the model failed), train_success (training completed and the model passed).
progressIntegerThe training progress, as a percentage.
isAlreadyDeployedBooleanIndicates whether the model has been deployed or whether one or more models with the same configuration are available.
extendObjectExtended configurations for the model.
extend.useHotQueryBooleanSpecifies whether hot query–based models are enabled. We recommend that you use these models.
extend.useHistoryQueryBooleanSpecifies whether history query–based models are enabled. We recommend that you use these models.