What is a confusion matrix?

Updated May 17, 2026

Short answer

A confusion matrix summarizes classification model performance using TP, TN, FP, and FN.

Deep explanation

It is a table that compares predicted vs actual values. It helps derive metrics like precision, recall, F1-score, and accuracy. It is essential for understanding classification performance beyond simple accuracy.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Supervised Learning interview questions

View all →