tests/testthat/test_base_dropFeatures.R

test_that("dropFeatures", {
  fns = getTaskFeatureNames(multiclass.task)
  task2 = dropFeatures(multiclass.task, fns[1])
  expect_equal(length(getTaskFeatureNames(task2)), 3L)
})

Try the mlr package in your browser

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

mlr documentation built on Sept. 29, 2022, 5:05 p.m.