FDEInterviews logo
Machine Learning & Data Science / 54
easyGoogleMicrosoftScale

What is a confusion matrix, and give a concrete case where accuracy is misleading.

A confusion matrix is the 2x2 of right and wrong predictions per class, and it is the reason a 99% accurate fraud model can be useless. The worked imbalance example, and how reading the matrix as precision and recall fixes the lie.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

A confusion matrix is the 2x2 of right and wrong predictions per class, and it is the reason a 99% accurate fraud model can be useless. The worked imbalance example, and how reading the matrix as precision and recall fixes the lie.

20 answers per topic instead of 10, plus saved progress and bookmarks · no cardor unlock all 523 remaining answers · ₹2,000 / $25
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The screen is whether the candidate can both lay out the four cells (TP/FP/FN/TN) correctly AND produce a sharp imbalance example where high accuracy hides a model that catches nothing, then recover precision and recall from the matrix. Strong candidates pick a rare-positive domain (fraud, disease, churn), compute the trivial 'always predict majority' baseline, and explain why that baseline scores high accuracy while having zero recall. The reserved follow-up is 'so what do you report instead': precision, recall, F1, or PR-AUC, chosen by which error costs more.

DISCUSSION · 0

No comments yet — be the first to share your approach.