@@ -464,20 +464,19 @@ given binary ``y_true`` and ``y_pred``:
464
464
There is no clear consensus on the definition of a balanced accuracy for the
465
465
multiclass setting. Here are some definitions that can be found in the literature:
466
466
467
- * Normalized class-wise accuracy average as described in [Guyon2015 ]_: for multi-class
468
- classification problem, each sample is assigned the class with maximum prediction value.
469
- The predictions are then binarized to compute the accuracy of each class on a
470
- one-vs-rest fashion. The balanced accuracy is obtained by averaging the individual
471
- accuracies over all classes and then normalized by the expected value of balanced
472
- accuracy for random predictions (:math: `0.5 ` for binary classification, :math: `1 /C`
473
- for C-class classification problem).
474
- * Macro-average recall as described in [Mosley2013 ]_ and [Kelleher2015 ]_: the recall
475
- for each class is computed independently and the average is taken over all classes.
467
+ * Macro-average recall as described in [Mosley2013 ]_, [Kelleher2015 ]_ and [Guyon2015 ]_:
468
+ the recall for each class is computed independently and the average is taken over all classes.
469
+ In [Guyon2015 ]_, the macro-average recall is then adjusted to ensure that random predictions
470
+ have a score of :math: `0 ` while perfect predictions have a score of :math: `1 `.
471
+ One can compute the macro-average recall using ``recall_score(average="macro") `` in :func: `recall_score `.
472
+ * Class balanced accuracy as described in [Mosley2013 ]_: the minimum between the precision
473
+ and the recall for each class is computed. Those values are then averaged over the total
474
+ number of classes to get the balanced accuracy.
475
+ * Balanced Accuracy as described in [Urbanowicz2015 ]_: the average of sensitivity and selectivity
476
+ is computed for each class and then averaged over total number of classes.
476
477
477
478
Note that none of these different definitions are currently implemented within
478
- the :func: `balanced_accuracy_score ` function. However, the macro-averaged recall
479
- is implemented in :func: `sklearn.metrics.recall_score `: set ``average `` parameter
480
- to ``"macro" ``.
479
+ the :func: `balanced_accuracy_score ` function.
481
480
482
481
.. topic :: References:
483
482
@@ -492,6 +491,8 @@ given binary ``y_true`` and ``y_pred``:
492
491
Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples,
493
492
and Case Studies <https://mitpress.mit.edu/books/fundamentals-machine-learning-predictive-data-analytics> `_,
494
493
2015.
494
+ .. [Urbanowicz2015 ] Urbanowicz R.J., Moore, J.H. `ExSTraCS 2.0: description and evaluation of a scalable learning
495
+ classifier system < https://doi.org/10.1007/s12065-015-0128-8> `_, Evol. Intel. (2015) 8: 89.
495
496
496
497
.. _cohen_kappa :
497
498
0 commit comments