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

Skip to content

LinearRegression uses _validate_parameters #23462 #23473

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

Closed
wants to merge 3 commits into from
Closed

LinearRegression uses _validate_parameters #23462 #23473

wants to merge 3 commits into from

Conversation

BBloggsbott
Copy link
Contributor

@BBloggsbott BBloggsbott commented May 26, 2022

Reference Issues/PRs

LinearRegression uses _validate_parameters as part of #23462

What does this implement/fix? Explain your changes.

  • The estimator defines a class attribute _parameter_constraints that defines the valid types and values for the parameters of the estimator.
  • fit calls _validate_parameters as the first step

Any other comments?

First contribution. So I have a question - What is the standard process used to organize imports and format code? I've seen some repos use pre-commit. Is something similar being used here?
Please let me know if I missed something. I'll fix it asap

@thomasjpfan
Copy link
Member

What is the standard process used to organize imports and format code?

This information is in the How to contribute section of the docs. It describes how to setup pre-commit hooks and using a feature branch for development changes.

@BBloggsbott
Copy link
Contributor Author

Thank you @thomasjpfan

@BBloggsbott BBloggsbott changed the title LogisticRegression uses _validate_parameters #23462 LinearRegression uses _validate_parameters #23462 May 27, 2022
Copy link
Contributor

@haochunchang haochunchang left a comment

Choose a reason for hiding this comment

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

LGTM!
Though I used from ..utils._param_validation import Integral in my PR, I think both are equivalent.

Quoting from https://scikit-learn.org/dev/developers/contributing.html#how-to-contribute point 8:

Always use a feature branch. It’s good practice to never work on the main branch!

@BBloggsbott
Copy link
Contributor Author

@haochunchang So should I raise a request to a different branch, or from a different branch from my repo?

@BBloggsbott
Copy link
Contributor Author

I see that a check is failing because I didn't add a changelog. Do I need to add one? If yes, can someone point me to the instructions for how to add it? I couldn't find one in the Contribution docs

@haochunchang
Copy link
Contributor

I think the source branch needs to be changed (different branch from your repo), you can refer to this SO question.

The changelog check has message in the detail: https://github.com/scikit-learn/scikit-learn/runs/6625328247?check_suite_focus=true#step:4:26035
I think changelog is not needed since the issue (#23463 ) opened by @jeremiedbb added the label but I may be wrong.

@BBloggsbott
Copy link
Contributor Author

@haochunchang Raised a new PR from a different branch. #23491. Closing this one

This pull request was closed.
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.

3 participants