JuliaGaussianProcesses / KernelFunctions.jl

Julia package for kernel functions for machine learning
https://juliagaussianprocesses.github.io/KernelFunctions.jl/stable/
MIT License
267 stars 32 forks source link

Ensure accepted input types are general where possible #480

Closed willtebbutt closed 1 year ago

willtebbutt commented 1 year ago

Summary

As discussed in #479 , some of our kernels / transforms etc is overly strict in terms of the types that it accepts, prompting users to find workaround. The goal of this is to resolve these problems and add some tests to prevent regression.

Proposed changes

What alternatives have you considered?

N/A

Breaking changes

N/A

codecov[bot] commented 1 year ago

Codecov Report

Base: 68.81% // Head: 79.54% // Increases project coverage by +10.72% :tada:

Coverage data is based on head (62f356a) compared to base (d425983). Patch coverage: 62.50% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #480 +/- ## =========================================== + Coverage 68.81% 79.54% +10.72% =========================================== Files 52 52 Lines 1347 1354 +7 =========================================== + Hits 927 1077 +150 + Misses 420 277 -143 ``` | [Impacted Files](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses) | Coverage Δ | | |---|---|---| | [src/TestUtils.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL1Rlc3RVdGlscy5qbA==) | `91.80% <50.00%> (-2.94%)` | :arrow_down: | | [src/transform/selecttransform.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL3RyYW5zZm9ybS9zZWxlY3R0cmFuc2Zvcm0uamw=) | `27.27% <50.00%> (-63.64%)` | :arrow_down: | | [src/distances/delta.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL2Rpc3RhbmNlcy9kZWx0YS5qbA==) | `100.00% <100.00%> (ø)` | | | [src/kernels/gibbskernel.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL2tlcm5lbHMvZ2liYnNrZXJuZWwuamw=) | `0.00% <0.00%> (-88.89%)` | :arrow_down: | | [src/kernels/normalizedkernel.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL2tlcm5lbHMvbm9ybWFsaXplZGtlcm5lbC5qbA==) | `0.00% <0.00%> (-82.50%)` | :arrow_down: | | [src/kernels/neuralkernelnetwork.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL2tlcm5lbHMvbmV1cmFsa2VybmVsbmV0d29yay5qbA==) | `0.00% <0.00%> (-77.56%)` | :arrow_down: | | [src/kernels/overloads.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL2tlcm5lbHMvb3ZlcmxvYWRzLmps) | `25.00% <0.00%> (-75.00%)` | :arrow_down: | | [src/transform/ardtransform.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL3RyYW5zZm9ybS9hcmR0cmFuc2Zvcm0uamw=) | `26.66% <0.00%> (-66.67%)` | :arrow_down: | | [src/transform/transform.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL3RyYW5zZm9ybS90cmFuc2Zvcm0uamw=) | `40.00% <0.00%> (-60.00%)` | :arrow_down: | | [src/transform/chaintransform.jl](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses#diff-c3JjL3RyYW5zZm9ybS9jaGFpbnRyYW5zZm9ybS5qbA==) | `20.00% <0.00%> (-60.00%)` | :arrow_down: | | ... and [27 more](https://codecov.io/gh/JuliaGaussianProcesses/KernelFunctions.jl/pull/480/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGaussianProcesses)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.