ChatDiagram
machine-learning · education

Produce Image Classifier Confusion Matrix

This example evaluates an image classifier trained to identify apples, oranges and bananas. The diagonal values are the correctly classified images. Apples and oranges create more confusion with each other than either does with bananas, which can guide a review of the training images, lighting conditions or class definitions. A confusion matrix is valuable because a single overall accuracy can hide this pattern. Before drawing conclusions, check that the test set contains representative images and that no class is much smaller than the others. This is a teaching example, so it uses simple labels and a compact three-class layout.

סוג מפת חוםמנוע echarts-heatmapעודכן 24.9.2026
Produce Images: Actual vs Predicted
Drawing preview
הבקשה

“Create a confusion matrix heatmap for a produce-image classifier with actual rows and predicted columns Apple, Orange and Banana. Use counts: Apple 78, 6, 1; Orange 8, 72, 4; Banana 2, 3, 81.”

ואז נסוAdd a class named Pear with its counts.Change the title to Produce Image Classifier — Test Set.
מה מופיע בתרשים הזה

פענחו את ההחלטות שמאחוריו.

01Use class labels

Make mistakes understandable.

02Read row patterns

See where each actual class goes.

03Compare diagonal counts

Find strong and weak classes.

Use for a labeled test set where every image has one class.

עיון בכל תבניות ה־מפת חום ←

שאלות נפוצות

שאלות נפוצות

Why are rows actual classes?

That layout shows where examples of each true class were predicted.

What can cause class confusion?

Similar appearance, weak training data or inconsistent labels can contribute.

Is accuracy enough?

No. The matrix reveals the distribution of errors across classes.