ENH Array Api support for linear, polynomial and sigmoid kernels#29475
Conversation
ogrisel
left a comment
There was a problem hiding this comment.
I checked the code for polynomial_kernel and linear_kernel and they indeed seem to be ok if left unchanged, so just adding them to the array API test suite should indeed be enough.
Assuming CI is still green after conflict resolution, LGTM.
|
The CUDA run was green: https://github.com/scikit-learn/scikit-learn/actions/runs/10451046790/job/28936627899 but the status was removed from the list once I added the "waiting for reviewer" label. |
|
There was a random 403 error calling |
|
@betatim this one should be quick to review and merge and would unblock the other linked PR. |
|
@adrinjalali Could you kindly review this PR? I think it should be quick review. |
| if gamma is None: | ||
| gamma = 1.0 / X.shape[1] | ||
|
|
||
| K = safe_sparse_dot(X, Y.T, dense_output=True) |
There was a problem hiding this comment.
I'm confused, safe_sparse_dot seems to support array API, but at the end we have
But I can't find toarray in the array API standard. So what am I missing?
There was a problem hiding this comment.
That part of the code only runs for sparse arrays. So it isn't linked to the array api.
…kit-learn#29475) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Reference Issues/PRs
Towards #26024
What does this implement/fix? Explain your changes.
sklearn.pairwiseAny other comments?
CC: @ogrisel @adrinjalali @betatim
Note: I did check that the CUDA tests seem to pass.