Implement precision and recall metrics for classification evaluation#49671
Implement precision and recall metrics for classification evaluation#49671przemekwitek merged 13 commits intoelastic:masterfrom
precision and recall metrics for classification evaluation#49671Conversation
|
Pinging @elastic/ml-core (:ml) |
91d83e0 to
3edeb6b
Compare
|
run elasticsearch-ci/1 |
2b97424 to
93fc929
Compare
93fc929 to
726c822
Compare
dimitris-athanasiou
left a comment
There was a problem hiding this comment.
Leaving a few comments. I'll revisit when recall has been adjusted.
...ain/java/org/elasticsearch/client/ml/dataframe/evaluation/classification/AccuracyMetric.java
Outdated
Show resolved
Hide resolved
...ain/java/org/elasticsearch/client/ml/dataframe/evaluation/classification/AccuracyMetric.java
Outdated
Show resolved
Hide resolved
...in/java/org/elasticsearch/client/ml/dataframe/evaluation/classification/PrecisionMetric.java
Outdated
Show resolved
Hide resolved
5249855 to
86dcaf3
Compare
dimitris-athanasiou
left a comment
There was a problem hiding this comment.
Some more comments as I go along the way.
There was a problem hiding this comment.
Do we also need a size parameter in all these like in the multiclass confusion matrix?
There was a problem hiding this comment.
I've just added size parameter to Precision and Recall metrics.
Also, I've added other_class_count parameter to Precision.Result and Recall.Result so that the user can tell if the result is complete.
There was a problem hiding this comment.
I've just added size parameter to Precision and Recall metrics.
Also, I've added other_class_count parameter to Precision.Result and Recall.Result so that the user can tell if the result is complete.
I reverted this change and implemented max cardinality enforcement as discussed. PTAL
There was a problem hiding this comment.
Should we be checking this? If for some reason precision is not finite, we'll end up reporting zero instead of NaN or infinity.
There was a problem hiding this comment.
We will not report zero but rather we will not report this particular class.
My reasoning behind this condition is that if we have an actual class that is never predicted (e.g: "cat"), precision for "cats" cannot be calculated so there is no point in reporting a precision entry with NaN value.
6c6406d to
6f254d8
Compare
|
run elasticsearch-ci/default-distro |
|
run elasticsearch-ci/bwc |
…tionMetric, RegressionMetric)
This reverts commit 81be647d6465e62971ac763605be4a080161cbdf.
d820384 to
dd74939
Compare
This PR implements
precisionandrecallmetrics for classification evaluation.Additionally, it:
EvaluationMetricinterface by allowing pipeline aggregations to be requested byaggsmethodactualIsTrueQuerymethod from interface to implementation as this method is implementation-specificRelates #48759