R: Survival Task Generator for Package 'simsurv'

mlr_task_generators_simsurv {mlr3proba} | R 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

- `TaskGeneratorSimsurv$new()`

- `TaskGeneratorSimsurv$clone()`

Inherited methods

- `mlr3::TaskGenerator$format()`

- `mlr3::TaskGenerator$generate()`

- `mlr3::TaskGenerator$print()`

#### 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()
    }

[Package mlr3proba version 0.3.2 Index]