context("regr_RRF")
test_that("regr_RRF", {
requirePackages("RRF", default.method = "load")
parset.list = list(
list(),
list(ntree = 5, mtry = 2),
list(ntree = 5, mtry = 4)
)
old.predicts.list = list()
for (i in seq_along(parset.list)) {
parset = parset.list[[i]]
pars = list(formula = regr.formula, data = regr.train)
pars = c(pars, parset)
set.seed(getOption("mlr.debug.seed"))
m = do.call(RRF::RRF, pars)
set.seed(getOption("mlr.debug.seed"))
p = predict(m, newdata = regr.test, type = "response")
old.predicts.list[[i]] = p
}
testSimpleParsets("regr.RRF", regr.df, regr.target,
regr.train.inds, old.predicts.list, parset.list)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.