mlr_task_generators_simsurv: Survival Task Generator for Package 'simsurv'

mlr_task_generators_simsurvR Documentation

Survival Task Generator for Package 'simsurv'

Description

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.

Dictionary

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")

Super class

mlr3::TaskGenerator -> TaskGeneratorSimsurv

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
TaskGeneratorSimsurv$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
TaskGeneratorSimsurv$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Dictionary of TaskGenerators: mlr3::mlr_task_generators

Examples

if (requireNamespace("simsurv", quietly = TRUE)) {
  generator = mlr3::mlr_task_generators$get("simsurv")
  task = generator$generate(20)
  task$head()
}

mlr3proba documentation built on April 25, 2022, 5:07 p.m.