[go: up one dir, main page]

Skip to content
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

ENH Array API support for euclidean_distances and rbf_kernel #29433

Merged
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e611758
ENH Array API support for euclidean_distances and rbf_kernel
OmarManzoor Jul 8, 2024
ba092bd
Fix for cupy.array_api
OmarManzoor Jul 8, 2024
ab46fec
Add alternative for np.dot and add rbf kernel
OmarManzoor Jul 9, 2024
191e29b
Remove tensordot
OmarManzoor Jul 9, 2024
7fa28e2
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
OmarManzoor Jul 9, 2024
a7dc716
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
ogrisel Jul 9, 2024
5a4f031
Retain in-place operations where possible
OmarManzoor Jul 9, 2024
fcaaa64
Add changelog
OmarManzoor Jul 9, 2024
3aae9d2
Add pr number
OmarManzoor Jul 9, 2024
d07865f
Improve _xp_method_has_out
OmarManzoor Jul 9, 2024
f8f75b1
Fix for dtype in zero definition
OmarManzoor Jul 9, 2024
c2290fb
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
OmarManzoor Jul 10, 2024
41118c7
Updates: according to PR suggestions
OmarManzoor Jul 10, 2024
6deb173
Minor change in docstring
OmarManzoor Jul 10, 2024
3145042
Fix docstring
OmarManzoor Jul 10, 2024
8960391
Handle mps float32 separately
OmarManzoor Jul 10, 2024
e67ddd3
Remove maximum from array api wrapper
OmarManzoor Jul 10, 2024
a1715f4
Add device float support section
OmarManzoor Jul 10, 2024
d43931a
Add the maximum function back along with a test
OmarManzoor Jul 10, 2024
8318e56
Updates: further suggestions
OmarManzoor Jul 10, 2024
074a0f1
Add tests for fill_or_add_to_diagonal
OmarManzoor Jul 10, 2024
363aaef
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
OmarManzoor Jul 10, 2024
6fc5a0b
Minor change in docstring
OmarManzoor Jul 10, 2024
ead6ea8
Further updates: based on PR review
OmarManzoor Jul 11, 2024
63f1242
Further updates: based on PR review
OmarManzoor Jul 11, 2024
3499bcf
Update TODO statement
OmarManzoor Jul 11, 2024
2eec496
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
OmarManzoor Jul 11, 2024
68b1467
Improve error message.
ogrisel Jul 11, 2024
7073aad
Merge branch 'main' into array_api_euclidean_distances_rbf_kernel
OmarManzoor Jul 11, 2024
526d932
Fix linting
OmarManzoor Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updates: further suggestions
  • Loading branch information
OmarManzoor committed Jul 10, 2024
commit 8318e564defc859a03e82247081f0f5bd8f50ce4
7 changes: 4 additions & 3 deletions doc/modules/array_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Metrics
- :func:`sklearn.metrics.pairwise.additive_chi2_kernel`
- :func:`sklearn.metrics.pairwise.chi2_kernel`
- :func:`sklearn.metrics.pairwise.cosine_similarity`
- :func:`sklearn.metrics.pairwise.euclidean_distances`
- :func:`sklearn.metrics.pairwise.euclidean_distances` (see :ref:`device_support_for_float64`)
- :func:`sklearn.metrics.pairwise.paired_cosine_distances`
- :func:`sklearn.metrics.pairwise.rbf_kernel`
- :func:`sklearn.metrics.pairwise.rbf_kernel` (see :ref:`device_support_for_float64`)
- :func:`sklearn.metrics.r2_score`
- :func:`sklearn.metrics.zero_one_loss`

Expand Down Expand Up @@ -207,4 +207,5 @@ correctness (e.g., :func:`metrics.pairwise.euclidean_distances`). However,
certain combinations of array namespaces and devices, such as `PyTorch on MPS`
(see :ref:`mps_support`) do not support the `float64` data type. In these cases,
scikit-learn will revert to using the `float32` data type instead. This can result in
different behavior compared to not using Array API dispatching.
different behavior (typically numerically unstable results) compared to not using array
API dispatching or using a device with `float64` support.
Loading