Skip to content

Prediction field in ml results is "text & keyword" for dependent variable of type "keyword". #50119

Closed
@przemekwitek

Description

@przemekwitek

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions