From 73be302ffb3fac38900febacc32c34921eed10c0 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 1 Jun 2020 17:25:08 +0200 Subject: [PATCH] Discard initial samples --- test/sampler.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sampler.jl b/test/sampler.jl index bc87d9de..ba11ff06 100644 --- a/test/sampler.jl +++ b/test/sampler.jl @@ -85,7 +85,7 @@ end # For other adapatation methods that are able to adpat the step size, we use `find_good_stepsize`. τ_used = adaptorsym == :MassMatrixAdaptorOnly ? τ : reconstruct(τ, integrator=reconstruct(lf, ϵ=find_good_stepsize(h, θ_init))) samples, stats = sample(h, τ_used , θ_init, n_samples, adaptor, n_adapts; verbose=false, progress=PROGRESS) - @test mean(samples) ≈ zeros(D) atol=RNDATOL + @test mean(samples[(n_adapts+1):end]) ≈ zeros(D) atol=RNDATOL test_stats(τ_used, stats, n_adapts) end end