MAINT validate parameters in LogisticRegression and LogisiticRegressionCV#23565
Conversation
|
Closed the Pull Request because of failure of tests. |
|
Removed tests that were validating error messages for Logistic Regression and Logistic Regression CV estimators. |
…stic_regression_validate_params
jeremiedbb
left a comment
There was a problem hiding this comment.
Thanks for the PR @Jitensid. Here are some suggestions
…stic_regression_validate_params
…stic_regression_validate_params
…com/Jitensid/scikit-learn into logistic_regression_validate_params
|
@Jitensid I directly pushed some small fixes. Otherwise LGTM |
…ssion and logsitic regression CV
…ssion and logsitic regression CV
|
@glemaitre I have made changes as per your suggestions. |
|
I don't think that we need the test @pytest.mark.parametrize("solver", ["lbfgs", "newton-cg", "sag", "saga"])
def test_multinomial_validation(solver):
lr = LogisticRegression(C=-1, solver=solver, multi_class="multinomial")
with pytest.raises(ValueError):
lr.fit([[0, 1], [1, 0]], [0, 1])
|
|
Removed the |
|
Thanks @Jitensid All good to be merged. |
Thank you @jeremiedbb @glemaitre for making my first open source contribution experience memorable. |
…onCV (scikit-learn#23565) Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Logistic Regression and Logistic Regression CV uses _validate_parameters as part of #23462
What does this implement/fix? Explain your changes.
_parameter_constraintsthat defines the valid types and values for the parameters.fitmethod first callsself._validate_params()method.Any other comments?
match=msgfrom it as I am not sure what to do about it.This is my first contribution. If I missed anything let me know I will fix it as soon as possible.