Machine Learning Fundamentals interview question · Most asked

Which metrics would you use for a classification model, and when is accuracy misleading?

How you'd do it Asked in Machine Learning Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

Accuracy misleads on imbalanced data: a fraud model that predicts "not fraud" every time is 99.9% accurate and useless. Use precision (of predicted positives, how many are right), recall (of real positives, how many we caught), F1, ROC-AUC or, for heavy imbalance, PR-AUC, and choose the threshold from the business cost of false positives vs false negatives.

Longer Answer

  • Confusion matrix first: it shows the actual errors.
  • Precision matters when false positives are costly (blocking good customers); recall when misses are costly (missed cancer, missed fraud).
  • ROC-AUC measures ranking quality across thresholds; PR-AUC is more informative when positives are rare.
  • Calibration (does a 0.8 score mean 80%?) matters when scores feed decisions or other systems; check with reliability curves and Brier score.
  • Thresholds are a business decision: pick the point on the curve that minimises expected cost or meets a recall target.
  • Regression: MAE, RMSE, MAPE, R²; ranking: NDCG, MAP.

Key Points

  • Accuracy fails on imbalanced classes.
  • Precision vs recall follows error costs.
  • PR-AUC for rare positives; calibration for probabilities.
  • Choose thresholds from business cost.

Explanation

What interviewers look for

Linking metric choice to the cost of each error type.

More Machine Learning Fundamentals questions

← All Machine Learning Fundamentals questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake