[scikit-learn] suggestion for metrics.classification_report
David R
dabruro at gmail.com
Wed May 4 13:37:52 EDT 2022
[Is there a better place to make a suggestion like this, other than this
mailing list?]
classification_report redundantly displays the *accuracy *on its own line
even though it is already also showing the *weighted average recall* which
is just another name for the *accuracy*!
Instead of this:
precision recall f1-score support
class 0 0.50 1.00 0.67 1 class 1
0.00 0.00 0.00 1 class 2 1.00 0.67
0.80 3
*accuracy * *0.60 5* macro
avg 0.50 0.56 0.49 5weighted avg 0.70
0.60 0.61 5
How about something more like the following to avoid the redundant
accuracy line above (and perhaps to *also *label *balanced *accuracy
while we're at it):
precision recall f1-score support
class 0 0.50 1.00 0.67 1 class 1 0.00
0.00 0.00 1 class 2 1.00 0.67 0.80 3
macro avg 0.50 0.56 * 0.49 5 * balanced
accuracyweighted avg 0.70 0.60 ** 0.61 5 ** accuracy
David Rosen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20220504/18d04682/attachment.html>
More information about the scikit-learn
mailing list