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

Add tests for unequal-length inputs #553

Closed
wants to merge 1 commit into from
Closed

Conversation

simsurace
Copy link
Member

To test whether kernelmatrix_diag gives the same output as diag ∘ kernelmatrix for two inputs of different lengths, c.f. question in #552.

If tests pass, we could in principle decide to remove the comment in the docstring and make that part of the public API.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c97a246) 90.88% compared to head (a2902be) 42.19%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #553       +/-   ##
===========================================
- Coverage   90.88%   42.19%   -48.69%     
===========================================
  Files          52       52               
  Lines        1459     1448       -11     
===========================================
- Hits         1326      611      -715     
- Misses        133      837      +704     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willtebbutt
Copy link
Member

I'm not hugely opposed to this, but I would like to know if you can think of a good use-case for getting an off-diagonal of the kernel matrix. If there's not a good reason to include it in the interface, I'd rather not start having to support it.

@simsurace
Copy link
Member Author

Well, it actually does not seem to work for many kernels and mainly because of the calls to Distances.jl.
I don't have a specific use case but simply noted the discrepancy with LinearAlgebra.diag and that it tends to work for the scalar inputs.

@willtebbutt
Copy link
Member

Okay. Shall we just leave this then?

@simsurace
Copy link
Member Author

Yeah, let's close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants