Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC added intervals for parameters for 4 glm classes #22076

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 6 commits into from
Jan 24, 2022

Conversation

reshamas
Copy link
Member

@reshamas reshamas commented Dec 26, 2021

Reference Issues/PRs

References #21927 and #21946

What does this implement/fix? Explain your changes.

  • Working on these classes:
    • class GeneralizedLinearRegressor(RegressorMixin, BaseEstimator)
    • class PoissonRegressor(GeneralizedLinearRegressor)
    • class GammaRegressor(GeneralizedLinearRegressor)
    • class TweedieRegressor(GeneralizedLinearRegressor)
  • Add possible interval ranges for 4 parameters: alpha, max_iter, tol and verbose

Any other comments?

#DataUmbrella #postsprint

@reshamas
Copy link
Member Author

reshamas commented Jan 3, 2022

@ogrisel Did you want to review this PR as well? It's (relatively) simpler than the other one on SGDClassifier.


warm_start : bool, default=False
If set to ``True``, reuse the solution of the previous call to ``fit``
as initialization for ``coef_`` and ``intercept_``.

verbose : int, default=0
For the lbfgs solver set verbose to any positive number for verbosity.
Values should be in the range `[1, inf)`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Values should be in the range `[1, inf)`.
Values should be in the range `[0, inf)`.


warm_start : bool, default=False
If set to ``True``, reuse the solution of the previous call to ``fit``
as initialization for ``coef_`` and ``intercept_`` .

verbose : int, default=0
For the lbfgs solver set verbose to any positive number for verbosity.
Values should be in the range `[1, inf)`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Values should be in the range `[1, inf)`.
Values should be in the range `[0, inf)`.

@reshamas
Copy link
Member Author

Reminder to me:

  • use text "Values must be in ..." instead of "Values should be in ..."

@@ -72,6 +72,7 @@ class GeneralizedLinearRegressor(RegressorMixin, BaseEstimator):
regularization strength. ``alpha = 0`` is equivalent to unpenalized
GLMs. In this case, the design matrix `X` must have full column rank
(no collinearities).
Values should be in the range `[0.0, inf)`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be in line with #21946

Suggested change
Values should be in the range `[0.0, inf)`.
Values must be in the range `[0.0, inf)`.

@glemaitre glemaitre merged commit 561bad9 into scikit-learn:main Jan 24, 2022
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @reshamas Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants