Preview features used by data frame analytics
Generally available; Added in 7.13.0
All methods and paths for this operation:
GET
/_ml/data_frame/analytics/_preview
POST
/_ml/data_frame/analytics/_preview
GET
/_ml/data_frame/analytics/{id}/_preview
POST
/_ml/data_frame/analytics/{id}/_preview
Preview the extracted features used by a data frame analytics config.
Required authorization
- Cluster privileges:
monitor_ml
POST
/_ml/data_frame/analytics/{id}/_preview
Console
POST _ml/data_frame/analytics/_preview
{
"config": {
"source": {
"index": "houses_sold_last_10_yrs"
},
"analysis": {
"regression": {
"dependent_variable": "price"
}
}
}
}
resp = client.ml.preview_data_frame_analytics(
config={
"source": {
"index": "houses_sold_last_10_yrs"
},
"analysis": {
"regression": {
"dependent_variable": "price"
}
}
},
)
const response = await client.ml.previewDataFrameAnalytics({
config: {
source: {
index: "houses_sold_last_10_yrs",
},
analysis: {
regression: {
dependent_variable: "price",
},
},
},
});
response = client.ml.preview_data_frame_analytics(
body: {
"config": {
"source": {
"index": "houses_sold_last_10_yrs"
},
"analysis": {
"regression": {
"dependent_variable": "price"
}
}
}
}
)
$resp = $client->ml()->previewDataFrameAnalytics([
"body" => [
"config" => [
"source" => [
"index" => "houses_sold_last_10_yrs",
],
"analysis" => [
"regression" => [
"dependent_variable" => "price",
],
],
],
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"config":{"source":{"index":"houses_sold_last_10_yrs"},"analysis":{"regression":{"dependent_variable":"price"}}}}' "$ELASTICSEARCH_URL/_ml/data_frame/analytics/_preview"
client.ml().previewDataFrameAnalytics(p -> p
.config(c -> c
.source(s -> s
.index("houses_sold_last_10_yrs")
)
.analysis(a -> a
.regression(r -> r
.dependentVariable("price")
)
)
)
);
Request example
An example body for a `POST _ml/data_frame/analytics/_preview` request.
{
"config": {
"source": {
"index": "houses_sold_last_10_yrs"
},
"analysis": {
"regression": {
"dependent_variable": "price"
}
}
}
}