inst/paramtest/test_paramtest_classif.fnn.R

library(mlr3learners.fnn)

test_that("classif.fnn", {
  learner = lrn("classif.fnn")
  fun = FNN::knn # replace!
  exclude = c(
    "train", # handled by mlr
    "test", # handled by mlr
    "y", # handled by mlr
    "cl", # this is essentially the target feature, handled by mlr
    "prob" # handled by mlr
  )

  ParamTest = run_paramtest(learner, fun, exclude)
  expect_true(ParamTest, info = paste0(
    "
Missing parameters:
",
    paste0("- '", ParamTest$missing, "'", collapse = "
")))
})
mlr3learners/mlr3learners.fnn documentation built on June 9, 2020, 11:23 a.m.