Skip to content

Commit

Permalink
Merge pull request #937 from karlnapf/master
Browse files Browse the repository at this point in the history
fixed and enabled GPR unit test
  • Loading branch information
karlnapf committed Mar 14, 2013
2 parents 7f80fe7 + 5b7f8d7 commit a33c97c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/unit/regression/GaussianProcessRegression_unittest.cc
Expand Up @@ -88,8 +88,8 @@ TEST(GaussianProcessRegression,apply_regression_larger_test)
X_test[0]=0.3;
X_test[1]=1.3;
X_test[2]=2.5;
X_test[2]=2.7;
X_test[2]=3.1;
X_test[3]=2.7;
X_test[4]=3.1;


for (index_t i=0; i<n; ++i)
Expand Down Expand Up @@ -128,12 +128,11 @@ TEST(GaussianProcessRegression,apply_regression_larger_test)
0.373048041692408
0.253688340068952 */
SGVector<float64_t> prediction_vector=predictions->get_labels();
// EXPECT_LE(CMath::abs(prediction_vector[0]-0.221198406887592), 10E-15);
// EXPECT_LE(CMath::abs(prediction_vector[1]-0.537437461176145), 10E-15);
// EXPECT_LE(CMath::abs(prediction_vector[2]-0.431605035301329), 10E-15);
// EXPECT_LE(CMath::abs(prediction_vector[2]-0.373048041692408), 10E-15);
// EXPECT_LE(CMath::abs(prediction_vector[2]-0.253688340068952), 10E-15);

EXPECT_LE(CMath::abs(prediction_vector[0]-0.221198406887592), 10E-15);
EXPECT_LE(CMath::abs(prediction_vector[1]-0.537437461176145), 10E-15);
EXPECT_LE(CMath::abs(prediction_vector[2]-0.431605035301329), 10E-15);
EXPECT_LE(CMath::abs(prediction_vector[3]-0.373048041692408), 10E-15);
EXPECT_LE(CMath::abs(prediction_vector[4]-0.253688340068952), 10E-15);

SG_UNREF(predictions);
SG_UNREF(gpr);
Expand Down

0 comments on commit a33c97c

Please sign in to comment.