Skip to contents

Visualizations for mlr3proba::LearnerSurvCoxPH.

The argument type controls what kind of plot is drawn. The only possible choice right now is "ggforest" (default) which is a Forest Plot, using ggforest. This plot displays the estimated hazard ratios (HRs) and their confidence intervals (CIs) for different variables included in the (trained) model.

Usage

# S3 method for class 'LearnerSurvCoxPH'
autoplot(object, type = "ggforest", ...)

Arguments

object

(mlr3proba::LearnerSurvCoxPH).

type

(character(1)):
Type of the plot. See description.

...

Additional parameters passed down to ggforest.

Examples

# \donttest{
if (requireNamespace("mlr3proba")) {
  library(mlr3proba)
  library(mlr3viz)

  task = tsk("lung")
  learner = lrn("surv.coxph")
  learner$train(task)
  autoplot(learner)
}
#> Error in eval(fit$call$data): object 'task' not found
# }