Commit 531bda13 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Fix kernel test again

parent 78156c40
......@@ -29,9 +29,8 @@ BOOST_AUTO_TEST_CASE(test_kernel_SE_ARD)
kernel::SquaredExpARD<Params> se(2);
Eigen::VectorXd hp(se.h_params_size());
// kernel does not expect in log space anymore
hp(0) = 1;
hp(1) = 1;
hp(0) = 0;
hp(1) = 0;
se.set_h_params(hp);
......@@ -43,7 +42,7 @@ BOOST_AUTO_TEST_CASE(test_kernel_SE_ARD)
BOOST_CHECK(std::abs(s1 - std::exp(-0.5 * (v1.transpose() * v2)[0])) < 1e-5);
hp(0) = std::exp(1);
hp(0) = 1;
se.set_h_params(hp);
double s2 = se(v1, v2);
BOOST_CHECK(s1 < s2);
......@@ -51,10 +50,10 @@ BOOST_AUTO_TEST_CASE(test_kernel_SE_ARD)
Params::kernel_squared_exp_ard::set_k(1);
se = kernel::SquaredExpARD<Params>(2);
hp = Eigen::VectorXd(se.h_params_size());
hp(0) = 1;
hp(1) = 1;
hp(2) = 0;
hp(3) = 0;
hp(0) = 0;
hp(1) = 0;
hp(2) = -std::numeric_limits<double>::max();
hp(3) = -std::numeric_limits<double>::max();
se.set_h_params(hp);
BOOST_CHECK(s1 == se(v1, v2));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment