AI Glossary / Causal inference and experimentation / Intermediate

Balanced accuracy score

Definition

Balanced accuracy score measures classification performance by averaging the recall of each class with equal class weight. In binary classification, it is the average of sensitivity and specificity: the fraction of positives correctly detected and the fraction of negatives correctly rejected. This helps reveal performance hidden by unequal class sizes. It is a particular summary of class-wise correctness, not a general measure of fairness, probability quality, or business value.

What it means

Ordinary accuracy gives each evaluated example equal weight, so a large class can dominate the result. Balanced accuracy first calculates performance within each class, then gives those class-level rates equal weight. A rare class therefore contributes as much to the final average as a common class. That can make the score useful when recognizing every class matters. It does not mean the underlying data has been resampled or that errors have identical consequences in the real workflow.

How it works

Build a confusion matrix from reference labels and predicted class labels. For each actual class, divide the number correctly predicted as that class by the total number belonging to it. Average these recalls over the evaluated classes. In the ordinary binary case, this is one half of TP/(TP + FN) plus TN/(TN + FP). State the class set and handling of classes absent from an evaluation sample. Some software also offers a chance-adjusted version, which has a different baseline and must be identified explicitly.

Three practical examples

  • Fault classification: compare how reliably a model recognizes normal and faulty items when faults are uncommon.
  • Message routing: assess recall separately for each support category before averaging, so a large routine category does not conceal missed specialist requests.
  • Model monitoring: inspect changes in per-class recall and balanced accuracy alongside actual class frequencies and workload counts.

Think of it this way

Think of a school report that gives each subject equal importance instead of letting the subject with the most exercises dominate the grade. The analogy explains equal weighting of groups. Its limit is that classes are not necessarily equally costly, equally difficult, or equally well measured, and an equal-weight average can still hide a very weak individual result.

Worked example

A fictional test set contains 900 normal items and 100 faulty items. A classifier that labels every item normal gets 900 of 1,000 correct, so ordinary accuracy is 90%. Its recall for normal items is 900/900 = 1, while recall for faulty items is 0/100 = 0. Balanced accuracy is (1 + 0)/2 = 0.5, or 50%.
A second classifier correctly identifies 810 normal items and 80 faulty items. Its normal-class recall is 810/900 = 90%, and its faulty-class recall is 80/100 = 80%. Balanced accuracy is (90% + 80%)/2 = 85%. Ordinary accuracy is (810 + 80)/1,000 = 89%. The second model has slightly lower ordinary accuracy but much better class-balanced performance. It also produces 90 false alarms and misses 20 faults. Those counts still matter operationally: balanced accuracy does not decide whether the review capacity or consequences of missed faults make this model acceptable.

Illustrative case study

A fictional document-routing team evaluates four categories with very different volumes. Its overall accuracy rises after an update, but the smallest category's recall falls sharply. The team calculates balanced accuracy and retains all four class recalls in its report. It discovers that improvements to common documents outweighed losses in a specialist workflow under the original summary. The team investigates the affected examples and their labeling consistency before choosing a release, using the metric to expose a tradeoff rather than letting it make the decision alone.

Common misconceptions and mistakes

Balanced accuracy does not balance the training process, remove bias from labels, or prove equitable treatment of people. It is not the average of precision and recall, and it is not the F1 score. A binary score of 50% is the unadjusted no-discrimination reference, not the worst possible result; consistently reversed predictions can score zero. Precision can remain low despite strong balanced accuracy when the positive class is rare. Equal class weighting also does not substitute for explicitly modeled error costs.

Business use

Use the score when class imbalance makes ordinary accuracy insufficient and each class deserves visible evaluation. Always report class recalls and sample counts with the summary. Small rare-class samples can produce unstable estimates, even though their recall receives full weight. For a thresholded model, evaluate relevant thresholds without selecting one on the final test set. Pair the result with precision, confusion counts, calibration where probabilities are used, and an assessment of how mistakes affect the intended workflow.

People also ask

Is balanced accuracy the same as macro recall?

Under the stated single-label definition and consistent class handling, yes: both average class recalls equally.

Does changing class prevalence always change it?

If class-conditional error rates remain fixed, the population score remains fixed, although sampling variability and real distribution changes still matter.

What does adjusted balanced accuracy mean?

A chance-baseline correction rescales the score; for two classes, it is 2 times ordinary balanced accuracy minus 1.

Check your understanding

Why does predicting only the majority class score 50% balanced accuracy in the binary example?

Answer: It achieves recall 1 for one class and recall 0 for the other. Their equal-weight average is 0.5 regardless of the 900-to-100 class imbalance.

Related terms

  • Accuracy
  • Confusion matrix
  • Precision
  • macro recall
  • sensitivity
  • specificity
  • class imbalance
  • F1 score
  • decision threshold
  • chance adjustment
  • per-class evaluation

Learn next

Start with a two-class confusion matrix and calculate ordinary accuracy, both class recalls, and their average. Change the number of examples in each class while preserving the class-wise error rates to see which summaries move. Then study precision and threshold selection so class-balanced recognition can be connected to the number of reviews or mistakes a workflow will experience.

  • Confusion matrix
  • Accuracy
  • Precision

More in Causal inference and experimentation

  • Average precision at k - Average precision at k, commonly written AP@k, evaluates how early relevant items appear within the first k positions of a ranked result list.
  • Average treatment effect - The average treatment effect, or ATE, is the average difference between the outcome a defined population would experience under one intervention and the...
  • Average treatment effect on the treated - The average treatment effect on the treated, or ATT, is the average causal effect of an intervention among the units that actually received it.
  • BLEU (Bilingual Evaluation Understudy) - BLEU, short for Bilingual Evaluation Understudy, is an automatic metric originally designed to compare machine translations with human reference translations.
  • Box-Benkhen experiment - A Box - Behnken experiment uses a response-surface design to study how several controllable factors affect an outcome and to fit a quadratic model.
  • Brier score - The Brier score measures the quality of probability predictions by averaging squared differences between predicted probabilities and observed outcomes.

Sources

Scikit-learn, balanced_accuracy_score: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.balanced_accuracy_score.html Scikit-learn, recall_score: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.recall_score.html Scikit-learn, metrics and scoring guide: https://scikit-learn.org/stable/modules/model_evaluation.html

Previous: Balance Next: Balanced repeated replication

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer