context("performance")
test_that("performance", {
task = mlr.tasks$get("iris")
learner = mlr.learners$get("classif.dummy")
object = model = train(task, learner)
pred = predict(model, subset = 1:150)
p = performance(pred, measures = list(mlr.measures$get("mmce")))
pv = p$perf.vals
expect_numeric(pv, len = 1L, names = "unique", finite = TRUE, any.missing = FALSE)
expect_named(pv, "mmce")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.