JuliaGaussianProcesses / KernelFunctions.jl

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

Speed up tests #447

Closed st-- closed 2 years ago

st-- commented 2 years ago

The basekernels tests are currently by far the slowest, taking almost twice the time of the next-slowest test. A quick profiling suggests that the large kernelmatrix computations (by default on the order of 1000x1000) are at least somewhat to blame. The validity of the tests should not depend on how large they are, so this PR significantly reduces that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #447 (0902e84) into master (2162032) will increase coverage by 22.21%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #447       +/-   ##
===========================================
+ Coverage   70.94%   93.16%   +22.21%     
===========================================
  Files          52       52               
  Lines        1253     1259        +6     
===========================================
+ Hits          889     1173      +284     
+ Misses        364       86      -278     
Impacted Files Coverage Δ
src/test_utils.jl 94.11% <ø> (ø)
src/utils.jl 91.35% <0.00%> (+2.46%) :arrow_up:
src/kernels/transformedkernel.jl 72.72% <0.00%> (+6.06%) :arrow_up:
src/chainrules.jl 83.95% <0.00%> (+14.81%) :arrow_up:
src/basekernels/periodic.jl 100.00% <0.00%> (+44.44%) :arrow_up:
src/basekernels/exponential.jl 100.00% <0.00%> (+50.00%) :arrow_up:
src/basekernels/polynomial.jl 100.00% <0.00%> (+65.00%) :arrow_up:
src/basekernels/fbm.jl 100.00% <0.00%> (+71.42%) :arrow_up:
src/basekernels/matern.jl 100.00% <0.00%> (+75.00%) :arrow_up:
src/basekernels/rational.jl 100.00% <0.00%> (+80.00%) :arrow_up:
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2162032...0902e84. Read the comment docs.