Exercise

# Confusion matrix

When the response variable has just two outcomes, like the case of churn, the measures of success for the model are "how many cases where the customer churned did the model correctly predict?" and "how many cases where the customer didn't churn did the model correctly predict?". These can be found by generating a confusion matrix and calculating summary metrics on it. A mosaic plot is the natural way to visualize the results.

`churn`

and `mdl_churn_vs_both_inter`

are available; `dplyr`

and `yardstick`

are loaded.

Instructions 1/2

**undefined XP**

- Get the actual responses from the
`churn`

dataset. - Get the predicted responses from the rounded, fitted values of
`mdl_churn_vs_both_inter`

. - Create a table of the actual and predicted response values.
- Convert the table to a
`conf_mat`

confusion matrix object.