Skip to Main Content
Python Artificial Intelligence Projects for Beginners
book

Python Artificial Intelligence Projects for Beginners

by Dr. Joshua Eckroth
July 2018
Beginner content levelBeginner
162 pages
3h 25m
English
Packt Publishing
Content preview from Python Artificial Intelligence Projects for Beginners

Making a confusion matrix for the data

Let's make a confusion matrix to see which birds the dataset confuses. The confusion_matrix function from scikit-learn will produce the matrix, but it's a pretty big matrix:

Two hundred by two hundred is not easy to understand in a numeric form like this.

Here's some code from the scikit-learn documentation that allows us to plot the matrix and the color in the matrix:

We will need the actual names of the birds on the matrix so that we know the species that are being confused for each other. So, let's ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Artificial Intelligence with Python

Artificial Intelligence with Python

Prateek Joshi

Publisher Resources

ISBN: 9781789539462Supplemental Content