Create a data frame analytics job Added in 7.3.0
This API creates a data frame analytics job that performs an analysis on the source indices and stores the outcome in a destination index.
Path parameters
-
Identifier for the data frame analytics job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters.
Body Required
-
allow_lazy_start boolean
Specifies whether this job can start when there is insufficient machine learning node capacity for it to be immediately assigned to a node. If set to
false
and a machine learning node with capacity to run the job cannot be immediately found, the API returns an error. If set totrue
, the API does not return an error; the job waits in thestarting
state until sufficient machine learning node capacity is available. This behavior is also affected by the cluster-widexpack.ml.max_lazy_ml_nodes
setting. -
Additional properties are allowed.
-
analyzed_fields object
Additional properties are allowed.
-
description string
A description of the job.
-
Additional properties are allowed.
-
max_num_threads number
The maximum number of threads to be used by the analysis. Using more threads may decrease the time necessary to complete the analysis at the cost of using more CPU. Note that the process may use additional threads for operational functionality other than the analysis itself.
-
_meta object
-
model_memory_limit string
The approximate maximum amount of memory resources that are permitted for analytical processing. If your
elasticsearch.yml
file contains anxpack.ml.max_model_memory_limit
setting, an error occurs when you try to create data frame analytics jobs that havemodel_memory_limit
values greater than that setting. -
Additional properties are allowed.
-
headers object
-
version string
curl \
-X PUT http://api.example.com/_ml/data_frame/analytics/{id} \
-H "Content-Type: application/json" \
-d '{"allow_lazy_start":true,"analysis":{"":{"alpha":42.0,"dependent_variable":"string","downsample_factor":42.0,"early_stopping_enabled":true,"eta":42.0,"eta_growth_rate_per_tree":42.0,"feature_bag_fraction":42.0,"feature_processors":[{"frequency_encoding":{"feature_name":"string","field":"string","frequency_map":{}},"multi_encoding":{"processors":[42.0]},"n_gram_encoding":{"feature_prefix":"string","field":"string","length":42.0,"n_grams":[42.0],"start":42.0,"custom":true},"one_hot_encoding":{"field":"string","hot_map":"string"},"target_mean_encoding":{"default_value":42.0,"feature_name":"string","field":"string","target_map":{}}}],"gamma":42.0,"lambda":42.0,"max_optimization_rounds_per_hyperparameter":42.0,"max_trees":42.0,"num_top_feature_importance_values":42.0,"prediction_field_name":"string","randomize_seed":42.0,"soft_tree_depth_limit":42.0,"soft_tree_depth_tolerance":42.0,"":"string","loss_function":"string","loss_function_parameter":42.0},"outlier_detection":{"compute_feature_influence":true,"feature_influence_threshold":42.0,"method":"string","n_neighbors":42.0,"outlier_fraction":42.0,"standardization_enabled":true}},"analyzed_fields":{"includes":["string"],"excludes":["string"]},"description":"string","dest":{"index":"string","results_field":"string"},"max_num_threads":42.0,"_meta":{"additionalProperty1":{},"additionalProperty2":{}},"model_memory_limit":"string","source":{"index":"string","runtime_mappings":{"additionalProperty1":{"fields":{"additionalProperty1":{"type":"boolean"},"additionalProperty2":{"type":"boolean"}},"fetch_fields":[{"field":"string","format":"string"}],"format":"string","input_field":"string","target_field":"string","target_index":"string","script":{"source":"string","id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"":"painless","options":{"additionalProperty1":"string","additionalProperty2":"string"}},"type":"boolean"},"additionalProperty2":{"fields":{"additionalProperty1":{"type":"boolean"},"additionalProperty2":{"type":"boolean"}},"fetch_fields":[{"field":"string","format":"string"}],"format":"string","input_field":"string","target_field":"string","target_index":"string","script":{"source":"string","id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"":"painless","options":{"additionalProperty1":"string","additionalProperty2":"string"}},"type":"boolean"}},"_source":{"includes":["string"],"excludes":["string"]},"query":{}},"headers":{},"version":"string"}'
{
"allow_lazy_start": true,
"analysis": {
"": {
"alpha": 42.0,
"dependent_variable": "string",
"downsample_factor": 42.0,
"early_stopping_enabled": true,
"eta": 42.0,
"eta_growth_rate_per_tree": 42.0,
"feature_bag_fraction": 42.0,
"feature_processors": [
{
"frequency_encoding": {
"feature_name": "string",
"field": "string",
"frequency_map": {}
},
"multi_encoding": {
"processors": [
42.0
]
},
"n_gram_encoding": {
"feature_prefix": "string",
"field": "string",
"length": 42.0,
"n_grams": [
42.0
],
"start": 42.0,
"custom": true
},
"one_hot_encoding": {
"field": "string",
"hot_map": "string"
},
"target_mean_encoding": {
"default_value": 42.0,
"feature_name": "string",
"field": "string",
"target_map": {}
}
}
],
"gamma": 42.0,
"lambda": 42.0,
"max_optimization_rounds_per_hyperparameter": 42.0,
"max_trees": 42.0,
"num_top_feature_importance_values": 42.0,
"prediction_field_name": "string",
"randomize_seed": 42.0,
"soft_tree_depth_limit": 42.0,
"soft_tree_depth_tolerance": 42.0,
"": "string",
"loss_function": "string",
"loss_function_parameter": 42.0
},
"outlier_detection": {
"compute_feature_influence": true,
"feature_influence_threshold": 42.0,
"method": "string",
"n_neighbors": 42.0,
"outlier_fraction": 42.0,
"standardization_enabled": true
}
},
"analyzed_fields": {
"includes": [
"string"
],
"excludes": [
"string"
]
},
"description": "string",
"dest": {
"index": "string",
"results_field": "string"
},
"max_num_threads": 42.0,
"_meta": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"model_memory_limit": "string",
"source": {
"index": "string",
"runtime_mappings": {
"additionalProperty1": {
"fields": {
"additionalProperty1": {
"type": "boolean"
},
"additionalProperty2": {
"type": "boolean"
}
},
"fetch_fields": [
{
"field": "string",
"format": "string"
}
],
"format": "string",
"input_field": "string",
"target_field": "string",
"target_index": "string",
"script": {
"source": "string",
"id": "string",
"params": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"": "painless",
"options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"type": "boolean"
},
"additionalProperty2": {
"fields": {
"additionalProperty1": {
"type": "boolean"
},
"additionalProperty2": {
"type": "boolean"
}
},
"fetch_fields": [
{
"field": "string",
"format": "string"
}
],
"format": "string",
"input_field": "string",
"target_field": "string",
"target_index": "string",
"script": {
"source": "string",
"id": "string",
"params": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"": "painless",
"options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"type": "boolean"
}
},
"_source": {
"includes": [
"string"
],
"excludes": [
"string"
]
},
"query": {}
},
"headers": {},
"version": "string"
}
{
"authorization": {
"api_key": {
"id": "string",
"name": "string"
},
"roles": [
"string"
],
"service_account": "string"
},
"allow_lazy_start": true,
"analysis": {
"": {
"alpha": 42.0,
"dependent_variable": "string",
"downsample_factor": 42.0,
"early_stopping_enabled": true,
"eta": 42.0,
"eta_growth_rate_per_tree": 42.0,
"feature_bag_fraction": 42.0,
"feature_processors": [
{
"frequency_encoding": {},
"multi_encoding": {},
"n_gram_encoding": {},
"one_hot_encoding": {},
"target_mean_encoding": {}
}
],
"gamma": 42.0,
"lambda": 42.0,
"max_optimization_rounds_per_hyperparameter": 42.0,
"max_trees": 42.0,
"num_top_feature_importance_values": 42.0,
"prediction_field_name": "string",
"randomize_seed": 42.0,
"soft_tree_depth_limit": 42.0,
"soft_tree_depth_tolerance": 42.0,
"": "string",
"loss_function": "string",
"loss_function_parameter": 42.0
},
"outlier_detection": {
"compute_feature_influence": true,
"feature_influence_threshold": 42.0,
"method": "string",
"n_neighbors": 42.0,
"outlier_fraction": 42.0,
"standardization_enabled": true
}
},
"analyzed_fields": {
"includes": [
"string"
],
"excludes": [
"string"
]
},
"": 42.0,
"description": "string",
"dest": {
"index": "string",
"results_field": "string"
},
"id": "string",
"max_num_threads": 42.0,
"_meta": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"model_memory_limit": "string",
"source": {
"index": "string",
"runtime_mappings": {
"additionalProperty1": {
"fields": {
"additionalProperty1": {
"type": "boolean"
},
"additionalProperty2": {
"type": "boolean"
}
},
"fetch_fields": [
{
"field": "string",
"format": "string"
}
],
"format": "string",
"input_field": "string",
"target_field": "string",
"target_index": "string",
"script": {
"source": "string",
"id": "string",
"params": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"": "painless",
"options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"type": "boolean"
},
"additionalProperty2": {
"fields": {
"additionalProperty1": {
"type": "boolean"
},
"additionalProperty2": {
"type": "boolean"
}
},
"fetch_fields": [
{
"field": "string",
"format": "string"
}
],
"format": "string",
"input_field": "string",
"target_field": "string",
"target_index": "string",
"script": {
"source": "string",
"id": "string",
"params": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"": "painless",
"options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"type": "boolean"
}
},
"_source": {
"includes": [
"string"
],
"excludes": [
"string"
]
},
"query": {}
},
"version": "string"
}