tests/testthat/test_FilterPermutation.R

test_that("FilterPermutation", {
  task = mlr3::mlr_tasks$get("iris")
  learner = mlr3::mlr_learners$get("classif.rpart")
  resampling = mlr3::rsmp("cv", folds = 2)
  f = flt("permutation", learner = learner, resampling = resampling, nmc = 3)

  f$calculate(task)
  expect_filter(f, task = 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.