revdep/checks.noindex/mlr3proba/old/mlr3proba.Rcheck/tests/testthat/test_mlr_learners_surv_gbm.R

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()
})
gbm-developers/gbm documentation built on Feb. 16, 2024, 6:13 p.m.