R: Log loss Survival Measure

mlr_measures_surv.logloss {mlr3proba} | R Documentation

## Log loss Survival Measure

### Description

Calculates the cross-entropy, or logarithmic (log), loss.

The logloss, in the context of probabilistic predictions, is defined as the negative log probability density function, f, evaluated at the observation time, t,

L(f, t) = -log(f(t))

The standard error of the Logloss, L, is approximated via,

se(L) = sd(L)/√ N

where N are the number of observations in the test set, and sd is the standard deviation.

The IPCW log loss is defined by

L(f, t, Δ) = -Δ log(f(t))/G(t)

where Δ is the censoring indicator and G is the Kaplan-Meier estimator of the censoring distribution.

### Details

If `task` and `train_set` are passed to `$score` then G is fit on training data, otherwise testing data. The first is likely to reduce any bias caused by calculating parts of the measure on the test data it is evaluating. The training data is automatically used in scoring resamplings.

### Dictionary

This Measure can be instantiated via the dictionary mlr_measures or with the associated sugar function msr():

    MeasureSurvLogloss$new()
    mlr_measures$get("surv.logloss")
    msr("surv.logloss")

### Meta Information

- Type: `"surv"`

- Range: [0, Inf)

- Minimize: `TRUE`

- Required prediction: `distr`

### Super classes

`mlr3::Measure` -> `mlr3proba::MeasureSurv` -> `MeasureSurvLogloss`

### Active bindings

`eps`

  (`numeric(1)`)
  Very small number used to prevent log(0) and 1/0 error.

`se`

  `(logical(1))`
  If `TRUE` returns the standard error of the measure.

`rm_cens`

  `(logical(1))`
  Deprecated, please use `IPCW` instead.

`IPCW`

  `(logical(1))`
  If `TRUE` (default) removes censored observations and weights score with IPC weighting calculated from the survival probability of the censoring distribution at the time of death.

### Methods

#### Public methods

- `MeasureSurvLogloss$new()`

- `MeasureSurvLogloss$clone()`

Inherited methods

- `mlr3::Measure$aggregate()`

- `mlr3::Measure$format()`

- `mlr3::Measure$help()`

- `mlr3::Measure$score()`

- `mlr3proba::MeasureSurv$print()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    MeasureSurvLogloss$new(
      eps = 0.000000000000001,
      se = FALSE,
      rm_cens = TRUE,
      IPCW = TRUE
    )

##### Arguments

`eps`

  (`numeric(1)`)
  Very small number to set zero-valued predicted probabilities to in order to prevent errors in log(0) and 1/0 calculation.

`se`

  (`logical(1)`)
  If `TRUE` returns the standard error of the measure.

`rm_cens`

  `(logical(1))`
  Deprecated, please use `IPCW` instead.

`IPCW`

  `(logical(1))`
  If `TRUE` (default) removes censored observations and weights score with IPC weighting calculated from the survival probability of the censoring distribution at the time of death.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    MeasureSurvLogloss$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### See Also

Other survival measures: `mlr_measures_surv.calib_alpha`, `mlr_measures_surv.calib_beta`, `mlr_measures_surv.chambless_auc`, `mlr_measures_surv.cindex`, `mlr_measures_surv.dcalib`, `mlr_measures_surv.graf`, `mlr_measures_surv.hung_auc`, `mlr_measures_surv.intlogloss`, `mlr_measures_surv.mae`, `mlr_measures_surv.mse`, `mlr_measures_surv.nagelk_r2`, `mlr_measures_surv.oquigley_r2`, `mlr_measures_surv.rmse`, `mlr_measures_surv.schmid`, `mlr_measures_surv.song_auc`, `mlr_measures_surv.song_tnr`, `mlr_measures_surv.song_tpr`, `mlr_measures_surv.uno_auc`, `mlr_measures_surv.uno_tnr`, `mlr_measures_surv.uno_tpr`, `mlr_measures_surv.xu_r2`

Other Probabilistic survival measures: `mlr_measures_surv.graf`, `mlr_measures_surv.intlogloss`, `mlr_measures_surv.schmid`

Other distr survival measures: `mlr_measures_surv.calib_alpha`, `mlr_measures_surv.dcalib`, `mlr_measures_surv.graf`, `mlr_measures_surv.intlogloss`, `mlr_measures_surv.schmid`

[Package mlr3proba version 0.4.2 Index]