What is a confusion matrix in model evaluation?

Updated May 17, 2026

Short answer

A confusion matrix is a table used to evaluate classification models by comparing predicted vs actual labels.

Deep explanation

A confusion matrix summarizes performance by counting true positives, true negatives, false positives, and false negatives. It helps understand not just accuracy but the types of errors a model makes.

Real-world example

Used in fraud detection to see how many fraudulent transactions were correctly or incorrectly flagged.

Common mistakes

  • Assuming accuracy alone is sufficient without analyzing false positives and negatives.

Follow-up questions

  • What do FP and FN represent?
  • How does imbalance affect it?

More Model Evaluation interview questions

View all →