|
21 | 21 | # Standardised tests. |
22 | 22 | TestUtils.test_interface(k, Float64) |
23 | 23 | test_ADs(() -> MaternKernel(; nu=ν)) |
24 | | - test_ADs_DIT(() -> MaternKernel(; nu=ν)) |
25 | | - |
26 | | - test_params(k, ([ν],)) |
27 | | - |
28 | | - # The performance of this kernel varies quite a lot from method to method, so |
29 | | - # requires us to specify whether performance tests pass or not. |
30 | | - @testset "performance ($T)" for T in [ |
31 | | - Vector{Float64}, |
32 | | - ColVecs{Float64,Matrix{Float64}}, |
33 | | - RowVecs{Float64,Matrix{Float64}}, |
34 | | - ] |
35 | | - xs = example_inputs(StableRNG(123456), Vector{Float64}) |
36 | | - test_interface_ad_perf( |
37 | | - ν -> MaternKernel(; nu=ν), |
38 | | - ν, |
39 | | - xs...; |
40 | | - passes=( |
41 | | - unary=(false, false, false), |
42 | | - binary=(false, false, false), |
43 | | - diag_unary=(true, false, false), |
44 | | - diag_binary=(true, false, false), |
45 | | - ), |
46 | | - ) |
47 | | - end |
48 | 24 | end |
49 | 25 | @testset "Matern32Kernel" begin |
50 | 26 | k = Matern32Kernel() |
|
61 | 37 | # Standardised tests. |
62 | 38 | TestUtils.test_interface(k, Float64) |
63 | 39 | test_ADs(Matern32Kernel) |
64 | | - test_ADs_DIT(Matern32Kernel) |
65 | | - test_interface_ad_perf(_ -> Matern32Kernel(), nothing, StableRNG(123456)) |
66 | 40 | end |
67 | 41 | @testset "Matern52Kernel" begin |
68 | 42 | k = Matern52Kernel() |
|
82 | 56 | # Standardised tests. |
83 | 57 | TestUtils.test_interface(k, Float64) |
84 | 58 | test_ADs(Matern52Kernel) |
85 | | - test_interface_ad_perf(_ -> Matern52Kernel(), nothing, StableRNG(123456)) |
86 | 59 | end |
87 | 60 | @testset "Matern72Kernel" begin |
88 | 61 | k = Matern72Kernel() |
|
106 | 79 | # Standardised tests. |
107 | 80 | TestUtils.test_interface(k, Float64) |
108 | 81 | test_ADs(Matern72Kernel) |
109 | | - test_interface_ad_perf(_ -> Matern72Kernel(), nothing, StableRNG(123456)) |
110 | 82 | end |
111 | 83 | @testset "Coherence Materns" begin |
112 | 84 | @test kappa(MaternKernel(; ν=0.5), x) ≈ kappa(ExponentialKernel(), x) |
|
0 commit comments