| mlr_task_generators_simsurv | R Documentation |
A mlr3::TaskGenerator calling simsurv::simsurv() from package simsurv.
This generator currently only exposes a small subset of the flexibility of simsurv, and just creates a small data set with the following numerical covariates:
treatment: Bernoulli distributed with log hazard ratio -0.5.
height: Normally distributed with log hazard ratio 1.
weight: normally distributed with log hazard ratio 0.
See simsurv::simsurv() for an explanation of the hyperparameters.
This TaskGenerator can be instantiated via the dictionary mlr_task_generators or with the associated sugar function tgen():
mlr_task_generators$get("simsurv")
tgen("simsurv")
mlr3::TaskGenerator -> TaskGeneratorSimsurv
new()Creates a new instance of this R6 class.
TaskGeneratorSimsurv$new()
clone()The objects of this class are cloneable with this method.
TaskGeneratorSimsurv$clone(deep = FALSE)
deepWhether to make a deep clone.
Dictionary of TaskGenerators: mlr3::mlr_task_generators
if (requireNamespace("simsurv", quietly = TRUE)) {
generator = mlr3::mlr_task_generators$get("simsurv")
task = generator$generate(20)
task$head()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.