Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
przemekwitek opened this issue Dec 12, 2019 · 1 comment · Fixed by #50219
Labels
:ml Machine learning

Comments

@przemekwitek
Copy link
Contributor

przemekwitek commented Dec 12, 2019

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

@przemekwitek przemekwitek added the :ml Machine learning label Dec 12, 2019
@przemekwitek przemekwitek self-assigned this Dec 12, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants