You can compute just TP (truepositive), FP, TN and FN counters and use
them to evaluate Recall, Precision, Accuracy, ect. If you want to specify
class for Pr evaluation, then you can compute Pr for first label as
TP/(TP+FP) and for second label as TN/(TN+FN) for example. After it we can
unite all onepoint metrics evaluation.
In my opinion we can redesign metrics calculation and provide onepoint
metrics (like Pr, Re) and integral metrics like ROC AUC where onepoint
metrics can be calculated through TP,FP etc.
Maybe you should design class BinaryClassificationMetric that computes
these counters and provide methods like recall :: () > double, precision
:: () > double, etc.
чт, 13 дек. 2018 г. в 13:26, Yuriy Babak <y.chief@gmail.com>:
> Igniters, Alexey
>
> I want to discuss the ticket 10371 [1], currently, we calculate 4 numbers
> (true positive, true negative, false positive, false negative) for each
> "point metric" like accuracy, recall, fscore and precision for each label.
>
> So for the full score we need calculates those 4 numbers 8 times. But we
> could calculate all 8 metrics(4 for the first label and 4 for the second
> label).
>
> I suggest introducing new API "point metric" for metrics like those
> 4(accuracy, recall, fscore, and precision) and "integral metric" for
> metrics like ROC AUC [2].
>
> Any thoughts would be appreciated.
>
> [1]  https://issues.apache.org/jira/browse/IGNITE10371
> [2]  https://issues.apache.org/jira/browse/IGNITE10145
>
