Skip to content

IsotonicRegression gives NANs on normal data #2507

@Felix-neko

Description

@Felix-neko

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions