Closed
Description
Even if the dependent variable specified in classification analysis is of type keyword
, the prediction field emitted as ml.foo_prediction
is dynamically mapped as text & keyword
.
This is confusing during evaluation, as in the evaluation request one has to specify:
1 {
2 "index": "index-ml",
3 "query": {
4 "term": {
5 "ml.is_training": false
6 }
7 },
8 "evaluation": {
9 "classification": {
10 "actual_field": "act",
11 "predicted_field": "ml.pred.keyword",
12 "metrics": {
13 "accuracy": {},
14 "multiclass_confusion_matrix": {}
15 }
16 }
17 }
18 }
One idea discussed within the team to solve the problem is to copy the mapping of the dependent variable to the prediction field (and ml.top_classes.class_name
fields).