Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
The Applied Artificial Intelligence Workshop

You're reading from  The Applied Artificial Intelligence Workshop

Product type Book
Published in Jul 2020
Publisher Packt
ISBN-13 9781800205819
Pages 420 pages
Edition 1st Edition
Languages
Authors (3):
Anthony So Anthony So
Profile icon Anthony So
William So William So
Profile icon William So
Zsolt Nagy Zsolt Nagy
Profile icon Zsolt Nagy
View More author details

Table of Contents (8) Chapters

Preface
1. Introduction to Artificial Intelligence 2. An Introduction to Regression 3. An Introduction to Classification 4. An Introduction to Decision Trees 5. Artificial Intelligence: Clustering 6. Neural Networks and Deep Learning Appendix

The Confusion Matrix

Previously, we learned how to use some calculated metrics to assess the performance of a classifier. There is another very interesting tool that can help you evaluate the performance of a multi-class classification model: the confusion matrix.

A confusion matrix is a square matrix where the number of rows and columns equals the number of distinct label values (or classes). In the columns of the matrix, we place each test label value. In the rows of the matrix, we place each predicted label value.

A confusion matrix looks like this:

Figure 4.10: Sample confusion matrix

In the preceding example, the first row of the confusion matrix is showing us that the model is doing the following:

  • Correctly predicting class A 88 times
  • Predicting class A when the true value is B 3 times
  • Predicting class A when the true value is C 2 times

We can also see the scenario where the model is making a lot of mistakes when it is predicting...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}