Allowing the array api to work with covariance OAS - #33600
Merged
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.
bruAristimunha
marked this pull request as draft
March 22, 2026 14:54
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
Co-authored-by: Olivier Grisel <[email protected]>
This avoids shifting X and let's us share the implementation with PCA.
Co-authored-by: Quentin Barthélemy <[email protected]>
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).
bruAristimunha
force-pushed
the
array-api-oas
branch
from
April 20, 2026 16:11
2981609 to
f2ed623
Compare
bruAristimunha
marked this pull request as ready for review
June 3, 2026 17:22
Contributor
Author
qbarthelemy
approved these changes
Jun 24, 2026
8 tasks
Contributor
Author
|
hey @betatim, Gentil ping |
ogrisel
approved these changes
Aug 18, 2026
Co-authored-by: Olivier Grisel <[email protected]>
ogrisel
reviewed
Aug 18, 2026
Member
|
Let me fix the failures after the merge with main. |
Member
|
For information, I ran the Intel GPU tests on this PR and they pass: https://github.com/probabl-ai/scikit-learn-intel-workflow/actions/runs/32142254203/job/95727479117 |
prady0t
pushed a commit
to prady0t/scikit-learn
that referenced
this pull request
Sep 2, 2026
Co-authored-by: Tim Head <[email protected]> Co-authored-by: Olivier Grisel <[email protected]> Co-authored-by: Quentin Barthélemy <[email protected]>
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.