# The Confusion Matrix

You encountered the confusion matrix in *Chapter 3, Binary Classification*. You may recall that the confusion matrix compares the number of classes that the model predicted against the actual occurrences of those classes in the validation dataset. The output is a square matrix that has the number of rows and columns equal to the number of classes you are predicting. The columns represent the actual values, while the rows represent the predictions. You get a confusion matrix by using `confusion_matrix`

from `sklearn.metrics`

.

## Exercise 6.06: Generating a Confusion Matrix for the Classification Model

The goal of this exercise is to create a confusion matrix for the classification model you trained in *Exercise 6.05*.

The following steps will help you achieve the task:

- Open a new Colab notebook file.
- Import
`confusion_matrix`

:from sklearn.metrics import confusion_matrix

In this step, you import

`confusion_matrix`

from`sklearn.metrics`

. This function will let...