-
-
Notifications
You must be signed in to change notification settings - Fork 25.4k
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
MNT Introduction of n_features_in_ attr with _validate_data mtd #16112
Conversation
…ranch 'master' of github.com:scikit-learn/scikit-learn into n_features_in
I am also thinking that it could be great to open a follow-up issue to address the remaining issue:
|
Thanks for the reviews !
Just to clarify, the common check only raises a warning for now. Also, our plan is to decide whether we make |
It looks good. We could merge I think @NicolasHug |
Ups wrong PR sorry (too many tabs opened :)) |
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!
Maybe let's wait for @jnothman's final review before merging. |
I think we need to decide on https://github.com/scikit-learn/scikit-learn/pull/16112/files#r378281885 before merging? |
During the meeting we decided to merge this PR and follow up with the introduction of a 'is_supervised' tag, and to raise a proper error message in I gave it a try but I don't think it will completely work: some estimators like ElasticNetCV will validate |
Do you want to fix conflicts so we can merge? |
As much as I want this to be merged, we don't have a viable fix at the moment. It seems like the tag won't work out (see message above). Do you think we should still merge? |
I feel pretty confident we can find a solution, though. So either we say relying on a tag is bad because it doesn't allow us to be flexible, and we pass it explicitly every time, or we refactor elasticnet to pass There's a bunch of possible solutions, I think:
|
OK, i'll fix the conflicts and merge when green thanks everyone for the reviews on this |
It's green! merging. Thanks again for the reviews |
Implements SLEP010
Superseds #13603
The
_validate_data
method is only called infit
andpartial_fit
. I will open other PRs later forpredict
,transform
, etc.Please note that while the SLEP was under review, #15557 was merged which allows the Gaussian Processes to support sequences of variable length. That use-case isn't covered by the SLEP. For now, the
n_features_in_
doesn't exist if a GP is passed a non-2d array.