Skip to content

Commit

Permalink
tests: re-enable holdout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Jan 19, 2025
1 parent 627c507 commit 497e34d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/testthat/test_ResamplingForecastHoldout.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("forecast_holdout basic properties", {
skip("currently require datetime column")
skip("currently require datetime column, i.e. don't sort based on ids")
task = tsk("penguins")
resampling = rsmp("forecast_holdout", ratio = 0.7)
expect_resampling(resampling, task)
Expand Down Expand Up @@ -38,10 +38,9 @@ test_that("forecast_holdout works", {
})

test_that("forecast_holdout repeated instantiation", {
skip("currently require datetime column")
task = tsk("penguins")

task = tsk("airpassengers")
resampling = rsmp("forecast_holdout", ratio = 0.6)

resampling$instantiate(task)
train_set_1 = resampling$train_set(1L)
test_set_1 = resampling$test_set(1L)
Expand All @@ -53,7 +52,7 @@ test_that("forecast_holdout repeated instantiation", {
expect_identical(train_set_1, train_set_2)
expect_identical(test_set_1, test_set_2)

resampling$param_set$values$ratio = 0.8
resampling$param_set$set_values(ratio = 0.8)
resampling$instantiate(task)
expect_false(identical(train_set_1, resampling$train_set(1L)))
expect_false(identical(test_set_1, resampling$test_set(1L)))
Expand Down

0 comments on commit 497e34d

Please sign in to comment.