Skip to content

Commit

Permalink
Fix tests for v11
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler committed Apr 14, 2024
1 parent d387e76 commit b3ef99f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/estimation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using Distributions: Uniform, Normal
using Statistics: mean
using LinearAlgebra: norm
using PERK: perk, GaussianKernel, EuclideanKernel, GaussianRFF
using StableRNGs: StableRNG


function test_perk_1()
Expand Down Expand Up @@ -47,7 +48,8 @@ function test_perk_2()
end

error_rel_avg = sum(error_rel) / length(error_rel)
return isapprox(error_rel_avg, 0.043934535569840415, atol = 1e-7)
ref = VERSION < v"1.10" ? 0.043934535569840415 : 0.04400107950561938
return isapprox(error_rel_avg, ref, atol = 1e-7)

end

Expand Down Expand Up @@ -96,7 +98,9 @@ function test_perk_4()
end

error_rel_avg = sum(error_rel) / length(error_rel)
return isapprox(error_rel_avg, 0.05827088471817421, atol = 1e-7)
ref = VERSION < v"1.10" ? 0.05827088471817421 : 0.05822451811335079

return isapprox(error_rel_avg, ref, atol = 1e-7)

end

Expand Down Expand Up @@ -283,7 +287,6 @@ function test_perk_12()

end


@testset "PERK" begin

@test test_perk_1()
Expand Down

0 comments on commit b3ef99f

Please sign in to comment.