Skip to content

Commit 9abb476

Browse files
committed
Add test for regularization
1 parent 03e3bad commit 9abb476

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/GaussianProcess/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ using CalibrateEmulateSample.Utilities
139139
@test vec(μ3) [0.0, 1.0, 0.0, -1.0, 0.0] atol = 0.3
140140
@test vec(σ3²) [0.016, 0.002, 0.003, 0.004, 0.003] atol = 1e-2
141141

142+
gp = GaussianProcess(gppackage; kernel = GPkernel, noise_learn = true, prediction_type = pred_type)
143+
Γ = 0.05I
144+
em = Emulator(gp, iopairs; encoder_schedule = [], encoder_kwargs = (; obs_noise_cov = Γ))
145+
@test gp.regularization[end] == gp.alg_reg_noise * Γ.λ
142146

143147
# -------------------------------------------------------------------------
144148
# Test case 2: 2D input, 2D output

0 commit comments

Comments
 (0)