tests/testthat/test_TaskSupervised.R

test_that("TaskSupervised Construction", {
  b = as_data_backend(iris)
  task = TaskSupervised$new(id = "foo", "classif", b, target = "Species")
  b = task$backend
  expect_backend(b)
  expect_task(task)
  expect_task_supervised(task)
})

Try the mlr3 package in your browser

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

mlr3 documentation built on Nov. 17, 2023, 5:07 p.m.