Skip to content

DOC - Ensure that TweedieRegressor pass numpydoc validation #21104

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

Merged
merged 3 commits into from
Sep 23, 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 @@ -46,7 +46,6 @@
"StackingClassifier",
"StackingRegressor",
"TransformedTargetRegressor",
"TweedieRegressor",
]


Expand Down
6 changes: 6 additions & 0 deletions sklearn/linear_model/_glm/glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,11 @@ class TweedieRegressor(GeneralizedLinearRegressor):

.. versionadded:: 1.0

See Also
--------
PoissonRegressor : Generalized Linear Model with a Poisson distribution.
GammaRegressor : Generalized Linear Model with a Gamma distribution.

Examples
----------
>>> from sklearn import linear_model
Expand Down Expand Up @@ -796,6 +801,7 @@ def __init__(

@property
def family(self):
"""Return the family of the regressor."""
# We use a property with a setter to make sure that the family is
# always a Tweedie distribution, and that self.power and
# self.family.power are identical by construction.
Expand Down