-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
API: do we allow a list of generic objects as X? #16130
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
Comments
For reference, the HMM module was removed precisely because of API incompatibility reasons. |
Vectorizers and any meta estimators that support vectorizers (pipelines,
searches) already do this. I don't see the problem: just as those meta
estimators delegate the input validation to the base estimator, so does the
custom kernel here.
|
HMM is different because there prediction is at the sub-sample level. Here
we are not making structured predictions, only accepting
structured/arbitrary observation representations.
|
Vectorizers and any meta estimators that support vectorizers (pipelines, searches) already do this. I don't see the problem: just as those meta estimators delegate the input validation to the base estimator, so does the custom kernel here.
In principle, I agree with Joel. It is actually a pattern that we have
used successfully in nilearn-compatible libraries.
|
I may be missing something, but it seems to me that #15557 makes the GPs partially incompatible with GridSearchCV or even simply cross-validation. How do you split an array of arbitrary shaped samples? |
An array of arbitrary shaped samples is still an array, so it should work well with scikit-learn/sklearn/utils/validation.py Lines 136 to 137 in 3f89a41
scikit-learn/sklearn/utils/__init__.py Lines 316 to 317 in 3f89a41
|
we should be consistent then. Right now we have:
|
we should be consistent then.
Should we? after you've done check_array, X.shape[0] is fine.
|
#15557 introduced a change in the GP module to allow a list of generic objects and kernels on those data, which is nice, but it violates our API AFAIK.
If we're going to allow that, there are many other places we can/should allow that as well (SVMs for instance).
But that doesn't really play well with the rest of the library (pipeline, GS, etc).
ping @scikit-learn/core-devs
The text was updated successfully, but these errors were encountered: