Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/transform/periodic_transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
# Construct in the usual way.
k_eq_periodic = PeriodicKernel(; r=[sqrt(0.25)]) ∘ ScaleTransform(f)

# Construct using the peridic transform.
# Construct using the periodic transform.
k_eq_transform = SqExponentialKernel() ∘ PeriodicTransform(f)

@test kernelmatrix(k_eq_periodic, x) ≈ kernelmatrix(k_eq_transform, x)
end
test_interface_ad_perf(0.95, StableRNG(123456), [Vector{Float64}]) do θ
SEKernel() ∘ PeriodicTransform(θ)

@testset "AD" begin
test_ADs(x -> SEKernel() ∘ PeriodicTransform(exp(x[1])), [2.3])
test_interface_ad_perf(0.95, StableRNG(123456), [Vector{Float64}]) do θ
SEKernel() ∘ PeriodicTransform(θ)
end
end
end