Skip to content

Overall accuracy is reported as 0.0 while it should be greater than 0 #53485

@przemekwitek

Description

@przemekwitek

Issue noticed and described by @wwang500:

I have a question about overall_accuracy result. when I ran _eval on car-parts classification/inference result index.

POST _ml/data_frame/_evaluate
{
  "index": "dest_car_parts_70_1583979097545",
  "evaluation": {
      "classification": {
        "actual_field": "ml.inference.predicted_value.keyword",
        "predicted_field": "ml.N_Lunker_prediction",
         "metrics": {
           "accuracy": {}
         }
      }
   }
}

I got this results:

{
  "classification" : {
    "accuracy" : {
      "classes" : [
        {
          "class_name" : "0",
          "accuracy" : 1.0
        },
        {
          "class_name" : "1",
          "accuracy" : 1.0
        }
      ],
      "overall_accuracy" : 0.0
    }
  }
}

shouldn't overall_accuracy be 1.0 too?
it might be caused the field mapping,
"ml.N_Lunker_prediction" : {"type" : "long"},
"ml.inference.predicted_value.keyword"

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning>bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions