Skip to content

Commit

Permalink
tests: try to fix stochastic error
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed Jun 16, 2023
1 parent 916c7bd commit a5a58f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_mlr_learners_classif_featureless.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ test_that("Simple training/predict", {
learner = lrn("classif.featureless")
expect_learner(learner, task)

learner$train(task)
learner$train(task, row_ids = c(1:50, 51:70, 101:120))
learner$predict(task)
expect_class(learner$model, "classif.featureless_model")
expect_numeric(learner$model$tab, len = 3L, any.missing = FALSE)
prediction = learner$predict(task)
expect_factor(prediction$response, any.missing = FALSE, levels = levels(iris$Species))
perf = prediction$score(msr("classif.ce"))
expect_number(perf, lower = 0.6, upper = 0.8)
expect_number(perf, lower = 0.6, upper = 0.7)
})

test_that("Predict with prob", {
Expand Down

0 comments on commit a5a58f5

Please sign in to comment.