-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
ENH Remove validation from __init__ for SGDOneClassSVM
#24433
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
ENH Remove validation from __init__ for SGDOneClassSVM
#24433
Conversation
8c8d629 to
44e1d8b
Compare
|
What exactly does scikit-learn/sklearn/tests/test_common.py Lines 434 to 463 in 53acd0f
SGDOneClassSVM the only estimator that is being checked? I was expecting this list to contain all estimators, except for those that do things like validate parameters. So I am a bit puzzled what happens here.
However based on what the code looks like ... should we remove |
Co-authored-by: iofall <[email protected]> Co-authored-by: arisayosh <[email protected]>
44e1d8b to
72c8061
Compare
it's the opposite actually. See the parametrization
It just checks that no error is raised (hence that no validation is done) when passing wrong params to init. All validations should happen in fit because meta estimators like GridSearchCV need to set params on already instanciated estimators |
Need to get my 👓 checked, the name of the variable made me think that "this is the initial list to consider, now lets filter it" for this list comprehension ... didn't see the Removed |
jeremiedbb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @betatim
ogrisel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that alpha = self.nu / 2 is already present in the SGDOneClassSVM.fit amd .partial_fit methods in scikit-learn's main branch so indeed we can just remove the alpha from the constructor.
Co-authored-by: iofall [email protected]
Co-authored-by: arisayosh [email protected]
Continuation of #21944 which contributes to #21406