Skip to content

Commit 09df953

Browse files
embanderaglemaitre
andauthored
DOC Ensures that IsotonicRegression passes numpydoc validation (scikit-learn#20514)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent 51e68a4 commit 09df953

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"HuberRegressor",
4949
"IncrementalPCA",
5050
"Isomap",
51-
"IsotonicRegression",
5251
"IterativeImputer",
5352
"KBinsDiscretizer",
5453
"KNNImputer",

sklearn/isotonic.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ class IsotonicRegression(RegressorMixin, TransformerMixin, BaseEstimator):
189189
increasing_ : bool
190190
Inferred value for ``increasing``.
191191
192+
See Also
193+
--------
194+
sklearn.linear_model.LinearRegression : Ordinary least squares Linear
195+
Regression.
196+
sklearn.ensemble.HistGradientBoostingRegressor : Gradient boosting that
197+
is a non-parametric model accepting monotonicity constraints.
198+
isotonic_regression : Function to solve the isotonic regression model.
199+
192200
Notes
193201
-----
194202
Ties are broken using the secondary method from de Leeuw, 1977.
@@ -348,7 +356,7 @@ def fit(self, X, y, sample_weight=None):
348356
return self
349357

350358
def transform(self, T):
351-
"""Transform new data by linear interpolation
359+
"""Transform new data by linear interpolation.
352360
353361
Parameters
354362
----------
@@ -361,7 +369,7 @@ def transform(self, T):
361369
Returns
362370
-------
363371
y_pred : ndarray of shape (n_samples,)
364-
The transformed data
372+
The transformed data.
365373
"""
366374

367375
if hasattr(self, "X_thresholds_"):

0 commit comments

Comments
 (0)