Skip to content

Infinite loop when running isotonic regression with some zero-valued weights #4297

@ogrisel

Description

@ogrisel

I extract the following bug from the discussion in #2507 (comment) :

import numpy as np
import sklearn.isotonic

regression = sklearn.isotonic.IsotonicRegression()
n_samples = 60

x = np.linspace(-3, 3, n_samples)
y = x + np.random.uniform(size=n_samples)
w = np.random.uniform(size=n_samples)
w[5:8] = 0
regression.fit(x, y, sample_weight=w)

This bug alone should probably be considered a release critical bug for 0.16.

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