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
- yiterable of floats
The data.
- sample_weightiterable of floats, optional, default: None
Weights on each point of the regression. If None, weight is set to 1 (equal weights).
- y_minoptional, default: None
If not None, set the lowest value of the fit to y_min.
- y_maxoptional, default: None
If not None, set the highest value of the fit to y_max.
- 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.