From f4a642bbc4455f59422052ce0839d03e446319e7 Mon Sep 17 00:00:00 2001 From: baam25simo Date: Wed, 8 Sep 2021 07:30:32 +0200 Subject: [PATCH 1/3] `GammaRegressor` removed from `DOCSTRING_IGNORE_LIST` in test_docstring.py. --- 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 69478c846a4a3..88c9ba20d1117 100644 --- a/maint_tools/test_docstrings.py +++ b/maint_tools/test_docstrings.py @@ -10,7 +10,6 @@ # List of modules ignored when checking for numpydoc validation. DOCSTRING_IGNORE_LIST = [ "Birch", - "GammaRegressor", "GaussianProcessRegressor", "GaussianRandomProjection", "GridSearchCV", From 4338e461724380df4a3ecb4f21dde31a03894e58 Mon Sep 17 00:00:00 2001 From: baam25simo Date: Wed, 8 Sep 2021 09:31:01 +0200 Subject: [PATCH 2/3] In `GammRegressor` : "See Also" section added. --- sklearn/linear_model/_glm/glm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sklearn/linear_model/_glm/glm.py b/sklearn/linear_model/_glm/glm.py index 49cd1d4222ccf..74a790c56b257 100644 --- a/sklearn/linear_model/_glm/glm.py +++ b/sklearn/linear_model/_glm/glm.py @@ -606,6 +606,11 @@ class GammaRegressor(GeneralizedLinearRegressor): .. versionadded:: 1.0 + See Also + -------- + PoissonRegressor : Generalized Linear Model with a Poisson distribution. + TweedieRegressor : Generalized Linear Model with a Tweedie distribution. + Examples -------- >>> from sklearn import linear_model From dc5425487d765e79020b931d545baee64a518231 Mon Sep 17 00:00:00 2001 From: baam25simo Date: Wed, 8 Sep 2021 09:33:39 +0200 Subject: [PATCH 3/3] In `GammaRegressor`: docstring added to `family` attribute. --- sklearn/linear_model/_glm/glm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sklearn/linear_model/_glm/glm.py b/sklearn/linear_model/_glm/glm.py index 74a790c56b257..9ca5dc2ff6237 100644 --- a/sklearn/linear_model/_glm/glm.py +++ b/sklearn/linear_model/_glm/glm.py @@ -653,6 +653,7 @@ def __init__( @property def family(self): + """Return the family of the regressor.""" # Make this attribute read-only to avoid mis-uses e.g. in GridSearch. return "gamma"