# sklearn.isotonic.isotonic_regression¶

sklearn.isotonic.isotonic_regression(y, *, sample_weight=None, y_min=None, y_max=None, increasing=True)[source]

Solve the isotonic regression model.

Read more in the User Guide.

Parameters
yarray-like of shape (n_samples,)

The data.

sample_weightarray-like of shape (n_samples,), default=None

Weights on each point of the regression. If None, weight is set to 1 (equal weights).

y_minfloat, default=None

Lower bound on the lowest predicted value (the minimum value may still be higher). If not set, defaults to -inf.

y_maxfloat, default=None

Upper bound on the highest predicted value (the maximum may still be lower). If not set, defaults to +inf.

increasingboolean, optional, default: True

Whether to compute y_ is increasing (if set to True) or decreasing (if set to False)

Returns
y_list of floats

Isotonic fit of y.

References

“Active set algorithms for isotonic regression; A unifying framework” by Michael J. Best and Nilotpal Chakravarti, section 3.