test_that("estimateResidualVariance", {
set.seed(getOption("mlr.debug.seed"))
task = regr.task
lrn = makeLearner("regr.lm")
x1 = estimateResidualVariance(lrn, task)
x2 = estimateResidualVariance(lrn, data = regr.df, target = regr.target)
expect_equal(round(x1, 4), 21.9382)
expect_equal(x1, x2)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.