-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Closed
Description
I have a problem with IsotonicRegression: it gives some NANs in case of fitting some data with values close to zero (but greater than sys.float_info.min).
I pickled some breaking data and uploaded them to SendSpace:
http://www.sendspace.com/file/0i18ib
And below is the crashing example.
# -*- coding: utf-8 -*-
import pickle
[xArray, yArray, weightArray, pPredicted] = pickle.load(open("bugreport.dmp", 'r'))
#xArray and yArray are the raw data I want to fit, weightArray are the sample weights. There are no NANs among them.
import sklearn
print sklearn.__version__ #SKLEARN v. 0.14.1
import sklearn.isotonic
regression = sklearn.isotonic.IsotonicRegression()
regression.fit(xArray, yArray, sample_weight=weightArray)
print regression.predict(xArray) # Oh no! It gives some NANs!