scikit-learn/scikit-learn — pull request #3278 by chicham (2014-06-14 17:47:46+00:00)
Title: Add thresh to discriminate positive value not retrieve in precision/recall curve

Added a thresh to take into account some case where precision/recall curve does not reach full recall.

This commit add a ```thresh_min``` argument to ```precision_recall_curve``` such as prediction below this thresh are ignored.

Example:

Evaluate an object detection system where objects not detect have a score of -1

```
y_true = [1., 1., 1., 0., 0., 1., 1., 0., 0., 0., 1., 1., 1., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 0., 0., 0., 1., 1., 1., 1.]
y_scores = [1., 1., 1., .9, .9, .8, .8, .7, .7, .7, .6, .6, .6, .5, .5, .5, .5, .4, .4, .4, .4, 0.2, 0.2, .2, .2, .2, -1., -1., -1., -1.]
```

The current implemenetation gives the following curve but does not take account that the system does not reach a full recall

![old_pr](https://cloud.githubusercontent.com/assets/362577/3279039/e3d82182-f3e4-11e3-9c19-46099b69114c.png)

The modified function with ```thresh_min = -1```
![new_pr](https://cloud.githubusercontent.com/assets/362577/3279038/e3d8125a-f3e4-11e3-9563-7399f39f01cb.png)