Precision, recall and F1 score - sagr4019/ResearchProject GitHub Wiki

General

The precision, recall and F1 scores are used to evaluate classifications.

Precision

The precision value corresponds to the fraction of all correct predicted elements of one class divided by all elements that where predicted for that class (also: true positives divided by true and false positives). If for example one had to classifiy pictures as ships or cars, the precision score would be all correct classified ships divided by all images classified as ship.

Recall

The recall value amounts to all correct predicted elements of one class divided by all elements of that class, therefore also the elements there were predicted to be of a different class (also: true positives / true positives + false negatives). For the example above this would be all correct classified ships divided by all images with ships.

F1

The F1 value is a combination of the precision and recall value and is calculated as follows: recall = 2 * (precision * recall) / (precision + recall) .

Sources