tests/testthat/test_mboost_surv_gamboost.R

test_that("autotest ph", {
  learner = lrn("surv.gamboost", baselearner = "bols", family = "coxph", center = TRUE)
  expect_learner(learner)
  # weights are fine for all predict types except 'distr'
  result = run_autotest(learner, exclude = "weights|utf8_feature_names", check_replicable = FALSE)
  expect_true(result, info = result$error)
})

test_that("autotest aft", {
  learner = lrn("surv.gamboost", family = "loglog", baselearner = "bols", center = TRUE)
  expect_learner(learner)
  # weights are fine for all predict types except 'distr'
  result = run_autotest(learner, exclude = "weights|utf8_feature_names", check_replicable = FALSE)
  expect_true(result, info = result$error)
})
mlr-org/mlr3extralearners documentation built on April 13, 2024, 5:25 a.m.