Warning: This documentation is for scikits.learn version 0.7.1. — Latest stable version

Contents

6.9.6. scikits.learn.metrics.recall_score

scikits.learn.metrics.recall_score(y_true, y_pred, pos_label=1)

Compute the recall

The recall is the ratio tp / (tp + fn) where tp is the number of true positives and fn the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.

The best value is 1 and the worst value is 0.

Parameters :

y_true : array, shape = [n_samples]

true targets

y_pred : array, shape = [n_samples]

predicted targets

pos_label : int

in the binary classification case, give the label of the positive class (default is 1)

Returns :

recall : float

recall of the positive class in binary classification or weighted avergage of the recall of each class for the multiclass task