Machine learningLesson 1 of 1 in the course Model evaluation

Confusion Matrices: Binary Outcomes, Imbalance, and Extensions

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

A confusion matrix summarizes how a classifier's predictions compare with the actual classes. It helps show not only how many predictions are correct, but also which kinds of mistakes the classifier makes.

A confusion matrix, also called an error matrix, is a table that compares actual classifications with predicted classifications. In a common layout, rows represent actual classes and columns represent predicted classes. Some sources reverse this layout, so always check the labels.

All flashcards

What is a confusion matrix?
A table that counts how often each actual class is assigned to each predicted class, helping summarize classification performance and errors.
What is a true positive?
A positive example that the classifier correctly predicts as positive.
What is a false negative?
An actually positive example that the classifier predicts as negative; it is a missed positive case.
What is a false positive?
An actually negative example that the classifier predicts as positive; it is an incorrect positive alert.
What do the diagonal and off-diagonal entries show?
With matching class order on both axes, diagonal entries are correct predictions and off-diagonal entries are classification errors.

Quiz questions

  1. What does a confusion matrix compare?Answer: Actual class labels with predicted class labels.
  2. An actually positive example is predicted as negative. Which outcome is this?Answer: A false negative.
  3. A standard confusion matrix represents a classifier with four classes. What are its dimensions?Answer: 4 × 4
  4. A classifier has TP=6TP=6, FN=2FN=2, FP=1FP=1, and TN=3TN=3. How many examples are correctly classified?Answer: 9, from 6 true positives and 3 true negatives.
  5. Why can accuracy be misleading on an imbalanced dataset?Answer: It can be high when a model predicts the majority class but performs poorly on the minority class.

Based on the Wikipedia article Confusion matrix, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Machine learning lessons