DOC add example to IsotonicRegression class
@@ -209,6 +209,15 @@ class IsotonicRegression(BaseEstimator, TransformerMixin, RegressorMixin):
Correctness of Kruskal's algorithms for monotone regression with ties
Leeuw, Psychometrica, 1977
+
+ Examples
+ --------
+ >>> from sklearn.datasets import make_regression
+ >>> from sklearn.isotonic import IsotonicRegression
+ >>> X, y = make_regression(n_samples=10, n_features=1, random_state=41)
+ >>> iso_reg = IsotonicRegression().fit(X.flatten(), y)
+ >>> iso_reg.predict([.1, .2]) # doctest: +ELLIPSIS
+ array([1.8628..., 3.7256...])
"""
def __init__(self, y_min=None, y_max=None, increasing=True,
out_of_bounds='nan'):
