W3cubDocs

/scikit-learn

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:

min sum w[i] (y[i] - y_[i]) ** 2

subject to y_min = y_[1] <= y_[2] ... <= y_[n] = y_max
where:
  • y[i] are inputs (real numbers)
  • y_[i] are fitted
  • w[i] are optional strictly positive weights (default to 1.0)

Read more in the User Guide.

Parameters:

y : iterable of floating-point values

The data.

sample_weight : iterable of floating-point values, optional, default: None

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

y_min : optional, default: None

If not None, set the lowest value of the fit to y_min.

y_max : optional, default: None

If not None, set the highest value of the fit to y_max.

increasing : boolean, optional, default: True

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

Returns:

y_ : list of floating-point values

Isotonic fit of y.

References

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

© 2007–2017 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.isotonic.isotonic_regression.html