8000 DOC Ensure HuberRegressor passes numpydoc validation (#21062) · scikit-learn/scikit-learn@7766920 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 7766920

Browse files
EricEllwangerfrellwanglemaitre
authored
DOC Ensure HuberRegressor passes numpydoc validation (#21062)
Co-authored-by: frellwan <frellwan@hotmail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 8fc3516 commit 7766920

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# List of modules ignored when checking for numpydoc validation.
1111
DOCSTRING_IGNORE_LIST = [
12-
"HuberRegressor",
1312
"IterativeImputer",
1413
"KNNImputer",
1514
"LabelPropagation",

sklearn/linear_model/_huber.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,19 @@ class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator):
205205
A boolean mask which is set to True where the samples are identified
206206
as outliers.
207207
208+
See Also
209+
--------
210+
RANSACRegressor : RANSAC (RANdom SAmple Consensus) algorithm.
211+
TheilSenRegressor : Theil-Sen Estimator robust multivariate regression model.
212+
SGDRegressor : Fitted by minimizing a regularized empirical loss with SGD.
213+
214+
References
215+
----------
216+
.. [1] Peter J. Huber, Elvezio M. Ronchetti, Robust Statistics
217+
Concomitant scale estimates, pg 172
218+
.. [2] Art B. Owen (2006), A robust hybrid of lasso and ridge regression.
219+
https://statweb.stanford.edu/~owen/reports/hhu.pdf
220+
208221
Examples
209222
--------
210223
>>> import numpy as np
@@ -227,13 +240,6 @@ class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator):
227240
Huber coefficients: [17.7906... 31.0106...]
228241
>>> print("Linear Regression coefficients:", linear.coef_)
229242
Linear Regression coefficients: [-1.9221... 7.0226...]
230-
231-
References
232-
----------
233-
.. [1] Peter J. Huber, Elvezio M. Ronchetti, Robust Statistics
234-
Concomitant scale estimates, pg 172
235-
.. [2] Art B. Owen (2006), A robust hybrid of lasso and ridge regression.
236-
https://statweb.stanford.edu/~owen/reports/hhu.pdf
237243
"""
238244

239245
def __init__(
@@ -271,6 +277,7 @@ def fit(self, X, y, sample_weight=None):
271277
Returns
272278
-------
273279
self : object
280+
Fitted `HuberRegressor` estimator.
274281
"""
275282
X, y = self._validate_data(
276283
X,

0 commit comments

Comments
 (0)
0