AIToday
Qiita 機械学習Published: Nov 21, 2026, 04:00 JST

混同行列 explained: TP, FP, FN, TN and what accuracy hides

Send on LINE
混同行列 explained: TP, FP, FN, TN and what accuracy hides

3 Key Points

  1. What happened

    The confusion matrix is broken down into TP, FP, FN and TN, showing how Accuracy, Sensitivity/Recall and Specificity are calculated from those four cells.

  2. Why it matters

    It warns that high accuracy can coexist with a minority class being completely mispredicted, so readers should look at the full matrix rather than accuracy alone.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The confusion matrix is a core concept for anyone studying machine learning or deep learning, worked from definition to interpretation. It lays out the two-by-two table — actual positive versus actual negative down the side, predicted positive versus predicted negative across the top — and derives three standard metrics from it: accuracy as (TP+TN)/(TP+TN+FP+FN), sensitivity or recall as TP/(TP+FN), and specificity as TN/(TN+FP).

The interpretation section ties those metrics to consequences rather than formulas. In medical diagnosis, a large number of false positives means specificity deserves emphasis, while the implementation notes add that when the costs of false negatives and false positives differ, the metric should follow the cost — for medicine, where a missed finding is dangerous, recall.

The piece also places the topic in exam context, noting the confusion matrix is a frequent G-test topic listed in the syllabus, and it points readers to study resources and a kid-friendly version of the same explanation.

FAQ
What does each cell of the confusion matrix mean?
TP and TN are correct predictions for the positive and negative classes, while FP and FN are the incorrect ones, with FN being a missed positive and FP a false positive.
What should I check when classes are imbalanced?
High accuracy can still come with a minority class being completely mispredicted, so you should look closely at the confusion matrix itself.
Why does sensitivity matter in medical diagnosis?
When the cost of a missed detection (false negative) is dangerous, as in medical diagnosis, recall should be emphasized.
Qiita 機械学習Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articleOne memory store to cut re-explaining across AIs