Skip to content

Commit

Permalink
Use approx in smc test.
Browse files Browse the repository at this point in the history
  • Loading branch information
alissarjohnson committed Sep 2, 2021
1 parent b108b79 commit fc741b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/estimate/smc/helpers.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
writing_output = false
if VERSION < v"1.5"
ver = "111"
else
else
ver = "150"
end
@everywhere Random.seed!(42)
Expand Down Expand Up @@ -35,7 +35,7 @@ if writing_output
end
end

file = JLD2.jldopen(joinpath(dirname(@__FILE__), "reference/helpers_output_version="
file = JLD2.jldopen(joinpath(dirname(@__FILE__), "reference/helpers_output_version="
* ver * ".jld2"), "r")
saved_ϕ_n = read(file, "phi_n")
saved_resampled_last_period = read(file, "resampled_last_period")
Expand Down Expand Up @@ -75,7 +75,7 @@ close(file)

####################################################################
@testset "MvNormal Mixture Draw" begin
@test test_θ_new == saved_θ_new
@test test_θ_new saved_θ_new
end


Expand Down Expand Up @@ -139,7 +139,7 @@ close(file)
test_ESS = SMC.compute_ESS(loglh, current_weights, ϕ_n, ϕ_n1)

if writing_output
file = JLD2.jldopen(joinpath(dirname(@__FILE__),"reference/smc_sw_cloud_fix=true_blocks=3.jld2"), "r")
file = JLD2.jldopen(joinpath(dirname(@__FILE__),"reference/smc_sw_cloud_fix=true_blocks=3.jld2"), "r")
saved_cloud = read(file, "cloud")
current_weights = read(file, "w")[:,3]
close(file)
Expand Down

0 comments on commit fc741b4

Please sign in to comment.