MNT Introduction of n_features_in_ attr with _validate_data mtd#16112
MNT Introduction of n_features_in_ attr with _validate_data mtd#16112NicolasHug merged 78 commits intoscikit-learn:masterfrom
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 :)) |
|
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_datamethod is only called infitandpartial_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.