tests/testthat/test_regr_rsm.R

test_that("regr_rsm", {
  requirePackagesOrSkip("rsm", default.method = "load")

  data = regr.df[, c("b", "lstat", "medv")]
  pars = list(medv ~ FO(b, lstat), data = data[regr.train.inds, ])
  m = do.call(rsm::rsm, pars)
  p = predict(m, newdata = regr.test)

  testSimple("regr.rsm", data, regr.target, regr.train.inds, p)
})

Try the mlr package in your browser

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

mlr documentation built on June 22, 2024, 10:51 a.m.