[WIP] Allowing the array api to work with covariance OAS#33600
Open
bruAristimunha wants to merge 27 commits into
Open
[WIP] Allowing the array api to work with covariance OAS#33600bruAristimunha wants to merge 27 commits into
bruAristimunha wants to merge 27 commits into
Conversation
The tests were written as part of a TDD approach during development, they cover things that the common tests also cover. So removing them to reduce the amount of duplication.
In some cases it returns flaot64 for float32 input. There are users who rely on this behaviour.
Contributor
Author
|
Just to let you know, I created the draft PR @betatim, @agramfort, @qbarthelemy. If there's anything I can help with or assist with, please let me know, and thank you again for your attention to this matter 🙏 |
If we flag it as supporting array API all the classes that inherit from it also get marked as supporting array API. This doesn't work, so we need to do this at the end when all estimators support array API.
14 tasks
3 tasks
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
This avoids shifting X and let's us share the implementation with PCA.
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Convert _oas() and OAS.fit() to use array API compatible operations, following the same pattern as LedoitWolf from PR scikit-learn#33573.
Vendor array_api_extra from bruAristimunha/array-api-extra#690 which renames the cov() kwarg from 'bias' to 'correction'. Rename the changelog entry to 33600 (Bru's PR number) and update its content to mention only OAS (since EmpiricalCovariance support was reverted in Tim's branch).
2981609 to
f2ed623
Compare
062d066 to
90e1230
Compare
This was referenced Apr 20, 2026
Contributor
Author
qbarthelemy
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Towards #33584, the sub-issue about
OASandoas.What does this implement/fix? Explain your changes.
Basically, allow the methods Covariance OAS and oas to work with the api array contract.
AI usage disclosure
I used AI assistance for:
Any other comments?
It is built on top of #33573, so it is necessary to merge #33573 first.