File: test_base_getParamSet.R

package info (click to toggle)
r-cran-mlr 2.19.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,392 kB
  • sloc: ansic: 65; sh: 13; makefile: 5
file content (16 lines) | stat: -rwxr-xr-x 551 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

test_that("getParamSet", {
  lrn = makeLearner("classif.lda")
  ps = getParamSet(lrn)
  expect_true(setequal(names(ps$pars), c("method", "nu", "tol", "predict.method", "CV", "prior")))

  lrn = makeFilterWrapper(lrn)
  ps = getParamSet(lrn)
  expect_true(all(c("method", "fw.method") %in% names(ps$pars)))

  lrn = makeModelMultiplexer(list(setLearnerId(lrn, "x")))
  ps = getParamSet(lrn)
  expect_true(all(c("x.method", "x.fw.method", "selected.learner") %in% names(ps$pars)))

  expect_true("type" %in% names(getParamSet("classif.ksvm")$pars))
})