tests/testthat/test_mlr3spatiotempcv.R

skip_if_not_installed("mlr3spatiotempcv")
skip_on_cran()

test_that("task detection works with mlr3spatiotempcv tasks", {
  pkg = "mlr3spatiotempcv"
  library(pkg, character.only = TRUE) # FIXME: replace with requireNamespace()
  task = tsk("ecuador")
  learner = lrn("classif.rpart")

  filter = flt("importance", learner = learner)
  expect_filter(filter$calculate(task))

  filter = flt("variance")
  expect_filter(filter$calculate(task))

  filter = flt("mim")
  expect_filter(filter$calculate(task))
})

Try the mlr3filters package in your browser

Any scripts or data that you put into this service are public.

mlr3filters documentation built on Feb. 16, 2023, 7:29 p.m.