context("surv.gbm")
test_that("autotest", {
set.seed(1)
# set low value for min obs b/c of small n in autogenerated tasks
learner = lrn("surv.gbm", id = "gbm", n.minobsinnode = 1L, n.trees = 100L)
expect_learner(learner)
result = run_autotest(learner, check_replicable = FALSE)
expect_true(result, info = result$error)
expect_error(learner$importance(), "No model stored")
learner$train(tsk("rats"))$importance()
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.