autoplot.TaskSurv | R Documentation |
Generates plots for TaskSurv, depending on argument type
:
"target"
: Calls GGally::ggsurv()
on a survival::survfit()
object.
This computes the Kaplan-Meier survival curve for the observations if this task.
"duo"
: Passes data and additional arguments down to GGally::ggduo()
.
columnsX
is target, columnsY
is features.
"pairs"
: Passes data and additional arguments down to
GGally::ggpairs()
.
Color is set to target column.
## S3 method for class 'TaskSurv'
autoplot(
object,
type = "target",
theme = theme_minimal(),
reverse = FALSE,
...
)
object |
(TaskSurv). |
type |
( |
theme |
( |
reverse |
( |
... |
( |
ggplot2::ggplot()
object.
library(mlr3)
library(mlr3viz)
library(mlr3proba)
library(ggplot2)
task = tsk("lung")
task$head()
autoplot(task) # KM
autoplot(task) # KM of the censoring distribution
autoplot(task, rhs = "sex")
autoplot(task, type = "duo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.