Using a confusion matrix to validate your classification model

Let's take a closer look at how you can measure the performance of a classification model using a confusion matrix. To understand how a confusion matrix works, let's create a confusion matrix for a binary classification model that predicts whether a credit card transaction was normal or fraudulent:

Actual fraud Actual normal
Predicted fraud True positive

False positive

Predicted normal False negative

True negative

The sample confusion matrix contains two columns and two rows. We have a column for the class fraud and a column for the class normal. We've added rows to the fraud and normal classes as well. The cells in the table will contain numbers that tell us ...

Get Deep Learning with Microsoft Cognitive Toolkit Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.