Sem Spirit

Precision and Recall

In the following, we consider a dataset of elements split into two sets ‘0’ and ‘1’ : an element belonging to the set x in the dataset is written « x-element ». We consider a classifier C that classifies elements into the two classes ‘0’ and ‘1’. An element classified in the set x is written « x-classified element ».

The structure of the confusion matrix of a binary classifier C is as follows :

Structure of the confusion matrix of a binary classifier and a dataset split in two classes

Structure of the confusion matrix of a binary classifier and a dataset split in two classes

Each cell denotes respectively the number of true negatives (TN), false negatives (FN), false positives (FP) and true positives (TP).

The precision measures the probability that an element 1-classified by the classifier is correctly classified.

Precision Definition

Precision Definition

The recall measures the probability of a 1-element to be classified by the classifier in the class ‘1’.
It is equivalent to another measure called « sensitivity« .

Recall Definition

Recall Definition