Learn R Programming

mlr3viz (version 0.10.1)

autoplot.LearnerSurvCoxPH: Plots for Cox Proportional Hazards Learner

Description

Visualizations for LearnerSurvCoxPH of mlr3proba.

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 LearnerSurvCoxPH
autoplot(object, type = "ggforest", ...)

Value

ggplot2::ggplot().

Arguments

object

(LearnerSurvCoxPH of mlr3proba).

type

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

...

Additional parameters passed down to ggforest.

Examples

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

  task = tsk("lung")
  learner = lrn("surv.coxph")
  learner$train(task)
  autoplot(learner)
}
# }

Run the code above in your browser using DataLab