From 6330fbfd3f00465aa20fe6b7ea9c6e8eb043023b Mon Sep 17 00:00:00 2001 From: Mitzi <46392144+embandera@users.noreply.github.com> Date: Mon, 12 Jul 2021 13:23:24 -0700 Subject: [PATCH 1/3] Remove IsotonicRegression from docstrings_ignore_list --- maint_tools/test_docstrings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/maint_tools/test_docstrings.py b/maint_tools/test_docstrings.py index 32c3fa726c295..697d63e8ecb37 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -55,7 +55,6 @@ "HuberRegressor", "IncrementalPCA", "Isomap", - "IsotonicRegression", "IterativeImputer", "KBinsDiscretizer", "KNNImputer", From cda5f3580012e4622d775c282752dea840c2c682 Mon Sep 17 00:00:00 2001 From: Mitzi <46392144+embandera@users.noreply.github.com> Date: Mon, 12 Jul 2021 13:56:18 -0700 Subject: [PATCH 2/3] Ensure IsotonicRegression passes numpydoc validation --- sklearn/isotonic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sklearn/isotonic.py b/sklearn/isotonic.py index 6e5e92d409ca3..3a6cf0df87284 100644 --- a/sklearn/isotonic.py +++ b/sklearn/isotonic.py @@ -189,6 +189,10 @@ class IsotonicRegression(RegressorMixin, TransformerMixin, BaseEstimator): increasing_ : bool Inferred value for ``increasing``. + See Also + -------- + LinearRegression : Ordinary least squares Linear Regression. + Notes ----- Ties are broken using the secondary method from de Leeuw, 1977. @@ -348,7 +352,7 @@ def fit(self, X, y, sample_weight=None): return self def transform(self, T): - """Transform new data by linear interpolation + """Transform new data by linear interpolation. Parameters ---------- @@ -361,7 +365,7 @@ def transform(self, T): Returns ------- y_pred : ndarray of shape (n_samples,) - The transformed data + The transformed data. """ if hasattr(self, "X_thresholds_"): From 153622781fcca0ea31a2d30e6a22ac42c7ec3c54 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Tue, 20 Jul 2021 16:41:21 +0200 Subject: [PATCH 3/3] apply suggestion ogrisel --- sklearn/isotonic.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sklearn/isotonic.py b/sklearn/isotonic.py index 3a6cf0df87284..291a09dabf94e 100644 --- a/sklearn/isotonic.py +++ b/sklearn/isotonic.py @@ -191,7 +191,11 @@ class IsotonicRegression(RegressorMixin, TransformerMixin, BaseEstimator): See Also -------- - LinearRegression : Ordinary least squares Linear Regression. + sklearn.linear_model.LinearRegression : Ordinary least squares Linear + Regression. + sklearn.ensemble.HistGradientBoostingRegressor : Gradient boosting that + is a non-parametric model accepting monotonicity constraints. + isotonic_regression : Function to solve the isotonic regression model. Notes -----