View source: R/LearnerSurvCoxPH.R
autoplot.LearnerSurvCoxPH | R Documentation |
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.
## S3 method for class 'LearnerSurvCoxPH'
autoplot(object, type = "ggforest", ...)
object |
(mlr3proba::LearnerSurvCoxPH). |
type |
(character(1)): |
... |
Additional parameters passed down to |
ggplot2::ggplot()
.
if (requireNamespace("mlr3proba")) {
library(mlr3proba)
library(mlr3viz)
task = tsk("lung")
learner = lrn("surv.coxph")
learner$train(task)
autoplot(learner)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.