Use to train and then immediately predict against the same training dataset. Can only be used with unsupervised learning models and the following algorithms:
-`BATCH_RCF`
-`FIT_RCF`
-`k-means`
#### Example request: Train and predict with indexed data
```json
POST /_plugins/_ml/_train_predict/kmeans
{
"parameters": {
"centroids": 2,
"iterations": 10,
"distance_type": "COSINE"
},
"input_query": {
"query": {
"bool": {
"filter": [
{
"range": {
"k1": {
"gte": 0
}
}
}
]
}
},
"size": 10
},
"input_index": [
"test_data"
]
}
```
{% include copy-curl.html %}
#### Example request: Train and predict with data directly