Relaxed test

release/4.3a0
Frank Dellaert 2022-12-28 15:28:50 -05:00
parent 1134d1c88e
commit d537867981
1 changed files with 2 additions and 2 deletions

View File

@ -206,14 +206,14 @@ TEST(GaussianBayesNet, MonteCarloIntegration) {
gbn.push_back(noisyBayesNet.at(1));
double sum = 0.0;
constexpr size_t N = 500;
constexpr size_t N = 1000;
// loop for N samples:
for (size_t i = 0; i < N; i++) {
const auto X_i = gbn.sample();
sum += pow(X_i[_y_].x() - 5.0, 2.0);
}
// Expected is variance = 3*3
EXPECT_DOUBLES_EQUAL(9.0, sum / N, 0.1);
EXPECT_DOUBLES_EQUAL(9.0, sum / N, 0.5); // Pretty high.
}
/* ************************************************************************* */