Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Ensures that IsotonicRegression passes numpydoc validation #20514

Merged
merged 3 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"HuberRegressor",
"IncrementalPCA",
"Isomap",
"IsotonicRegression",
"IterativeImputer",
"KBinsDiscretizer",
"KNNImputer",
Expand Down
12 changes: 10 additions & 2 deletions sklearn/isotonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ class IsotonicRegression(RegressorMixin, TransformerMixin, BaseEstimator):
increasing_ : bool
Inferred value for ``increasing``.

See Also
--------
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.

glemaitre marked this conversation as resolved.
Show resolved Hide resolved
Notes
-----
Ties are broken using the secondary method from de Leeuw, 1977.
Expand Down Expand Up @@ -348,7 +356,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
----------
Expand All @@ -361,7 +369,7 @@ def transform(self, T):
Returns
-------
y_pred : ndarray of shape (n_samples,)
The transformed data
The transformed data.
"""

if hasattr(self, "X_thresholds_"):
Expand Down