Skip to content

Commit

Permalink
relax equality condition in test (numerical errrors)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyzinskim committed Jan 22, 2024
1 parent ac6d1ea commit b5fd287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test_xgboost_unify.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ test_that("xgboost: predictions from unified == original predictions", {
original <- stats::predict(xgb_model, as.matrix(obs))
from_unified <- predict(unifier, obs)
# expect_equal(from_unified, original) #there are small differences
expect_true(all(abs((from_unified - original) / original) < 5 * 10**(-4)))
expect_true(all(abs((from_unified - original) / original) < 5 * 10**(-3)))
})

test_that("xgboost: mean prediction calculated using predict == using covers", {
Expand Down

0 comments on commit b5fd287

Please sign in to comment.