mlr_graphs_survtoclassif_disctime | R Documentation |
Wrapper around PipeOpTaskSurvClassifDiscTime and PipeOpPredClassifSurvDiscTime to simplify Graph creation.
pipeline_survtoclassif_disctime(
learner,
cut = NULL,
max_time = NULL,
graph_learner = FALSE
)
learner |
LearnerClassif |
cut |
( |
max_time |
( |
graph_learner |
( |
The pipeline consists of the following steps:
PipeOpTaskSurvClassifDiscTime Converts TaskSurv to a TaskClassif.
A LearnerClassif is fit and predicted on the new TaskClassif
.
PipeOpPredClassifSurvDiscTime transforms the resulting PredictionClassif to PredictionSurv.
Optionally: PipeOpModelMatrix is used to transform the formula of the task before fitting the learner.
mlr3pipelines::Graph or mlr3pipelines::GraphLearner
This Graph can be instantiated via the dictionary mlr_graphs or with the associated sugar function ppl():
mlr_graphs$get("survtoclassif_disctime") ppl("survtoclassif_disctime")
Tutz, Gerhard, Schmid, Matthias (2016). Modeling Discrete Time-to-Event Data, series Springer Series in Statistics. Springer International Publishing. ISBN 978-3-319-28156-8 978-3-319-28158-2, http://link.springer.com/10.1007/978-3-319-28158-2.
Other pipelines:
mlr_graphs_crankcompositor
,
mlr_graphs_distrcompositor
,
mlr_graphs_probregr
,
mlr_graphs_responsecompositor
,
mlr_graphs_survaverager
,
mlr_graphs_survbagging
,
mlr_graphs_survtoclassif_IPCW
,
mlr_graphs_survtoregr_pem
## Not run:
library(mlr3)
library(mlr3learners)
library(mlr3pipelines)
task = tsk("lung")
part = partition(task)
grlrn = ppl(
"survtoclassif_disctime",
learner = lrn("classif.log_reg"),
cut = 4, # 4 equidistant time intervals
graph_learner = TRUE
)
grlrn$train(task, row_ids = part$train)
grlrn$predict(task, row_ids = part$test)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.