Skip to content

Commit

Permalink
Increase tol for std normal and stddev vector case
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesYang007 committed Jul 16, 2020
1 parent 6b2ffdb commit f89065f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/mcmc/hmc/nuts/nuts_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ TEST_F(nuts_fixture, nuts_std_normal)
nuts(model, config);

plot_hist(w_storage);
EXPECT_NEAR(sample_average(w_storage), 0., 0.03);
EXPECT_NEAR(sample_average(w_storage), 0., 0.05);
}

TEST_F(nuts_fixture, nuts_uniform)
Expand Down Expand Up @@ -428,10 +428,10 @@ TEST_F(nuts_fixture, nuts_mean_vec_stddev_vec) {
plot_hist(s1_storage, 0.25, 0.5, 5.);
plot_hist(s2_storage, 0.25, 0.5, 5.);

EXPECT_NEAR(sample_average(w_storage), 1.0, 0.08);
EXPECT_NEAR(sample_average(b_storage), 1.0, 0.08);
EXPECT_NEAR(sample_average(s1_storage), 2.23439659, 0.08);
EXPECT_NEAR(sample_average(s2_storage), 2.30538608, 0.08);
EXPECT_NEAR(sample_average(w_storage), 1.0, 0.25);
EXPECT_NEAR(sample_average(b_storage), 1.0, 0.25);
EXPECT_NEAR(sample_average(s1_storage), 2.23439659, 0.25);
EXPECT_NEAR(sample_average(s2_storage), 2.30538608, 0.25);
}

} // namespace ppl

0 comments on commit f89065f

Please sign in to comment.