I was wondering if anyone could explain the difference between balanced accuracy which is
b_acc = (sensitivity + specificity)/2
and f1 score which is:
f1 = 2*precision*recall/(precision + recall)
I was wondering if anyone could explain the difference between balanced accuracy which is
b_acc = (sensitivity + specificity)/2
and f1 score which is:
f1 = 2*precision*recall/(precision + recall)
Mathematically, b_acc is the arithmetic mean of recall_P and recall_N and f1 is the harmonic mean of recall_P and precision_P.
Both F1 and b_acc are metrics for classifier evaluation, that (to some extent) handle class imbalance. Depending of which of the two classes (N or P) outnumbers the other, each metric is outperforms the other.
1) If N >> P, f1 is a better.
2) If P >> N, b_acc is better.
Clearly, if you can label-switch, both the metrics can be used in any of the two imbalance cases above. If not, then depending on the imbalance in the training data, you can select the appropriate metric.