Calculate balanced accuracy to fairly evaluate models on imbalanced datasets.
Balanced accuracy averages the model's performance on each class separately: bal_acc = (sensitivity + specificity) / 2, where sensitivity is the true positive rate and specificity is the true negative rate. Because it weighs both classes equally regardless of how many examples each contains, balanced accuracy avoids the trap of standard accuracy on imbalanced datasets — a model that always predicts the majority class scores around 0.5 on balanced accuracy, correctly revealing it has no real skill.
balanced_accuracy = (sensitivity + specificity) / 2
Regular accuracy weighs every prediction equally, so it's dominated by the majority class on imbalanced data; balanced accuracy instead averages the per-class recall rates, giving each class equal importance regardless of its size.
A balanced accuracy of 0.5 (50%) indicates the classifier performs no better than random guessing when both classes are weighted equally — a common result for a model that just predicts the majority class every time.
No — they're both robust to class imbalance but computed differently; MCC uses a correlation-style formula incorporating all four confusion matrix cells simultaneously, while balanced accuracy is simply the arithmetic mean of sensitivity and specificity.