scikit-learn/scikit-learn — pull request #3995 by jmetzen (2014-12-23 12:25:15+00:00)
Title: FIX Isotonic Regression for duplicate minimal value

Fixes an issue of Isotonic Regression when the minimal value of fitting is duplicated, e.g.:

ir = IsotonicRegression(increasing=True, out_of_bounds="clip")
ir.fit([0, 0, 1], [0, 0, 1])
ir.predict([0])

would return `nan` (see test_isotonic_duplicate_min_entry). The deeper reason for this seems to be in interpolate.interp1d. This issue is fixed by clipping not to minimal value observed in fitting but to minimal value + np.finfo(float).resolution.