How does balanced accuracy correct for class imbalance compared to plain accuracy?

Quick Overview

Asks how balanced accuracy differs from plain accuracy when one class is much more common than the others. Tests the definition for binary and multiclass problems, a worked imbalanced example, the link to class reweighting, and what the metric fails to penalize.

How does balanced accuracy correct for class imbalance compared to plain accuracy?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How does balanced accuracy correct for class imbalance compared to plain accuracy? ```hint Try the majority-class guesser Take a test set with 98% negatives and a model that always predicts negative, and compute both metrics by hand. ``` ### What a Strong Answer Covers - The definition of balanced accuracy for binary and multiclass problems. - Why plain accuracy rewards majority-class predictions under imbalance, shown with numbers. - The link between balanced accuracy and reweighting the test set to equal class priors. - The limitations: what the metric ignores and where its chance level sits. ### Follow-up Questions - A fraud model catches every fraud but also flags many legitimate transactions. How would balanced accuracy and precision each describe it? - When would you report plain accuracy even though the classes are imbalanced? - How does balanced accuracy compare with F1 and the Matthews correlation coefficient on an imbalanced problem? - What does the `adjusted=True` option of scikit-learn's `balanced_accuracy_score` compute?

Overview: Asks how balanced accuracy differs from plain accuracy when one class is much more common than the others. Tests the definition for binary and multiclass problems, a worked imbalanced example, the link to class reweighting, and what the metric fails to penalize.

General logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How does balanced accuracy correct for class imbalance compared to plain accuracy?

What a Strong Answer Covers Guidance

  • The definition of balanced accuracy for binary and multiclass problems.
  • Why plain accuracy rewards majority-class predictions under imbalance, shown with numbers.
  • The link between balanced accuracy and reweighting the test set to equal class priors.
  • The limitations: what the metric ignores and where its chance level sits.

Follow-up Questions Guidance

  • A fraud model catches every fraud but also flags many legitimate transactions. How would balanced accuracy and precision each describe it?
  • When would you report plain accuracy even though the classes are imbalanced?
  • How does balanced accuracy compare with F1 and the Matthews correlation coefficient on an imbalanced problem?
  • What does the adjusted=True option of scikit-learn's balanced_accuracy_score compute?