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

Censored observations in the test set are ignored.

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, \infty)\)

  • Minimize: TRUE

  • Required prediction: distr

See also

Super classes

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

Active bindings

eps

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

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

MeasureSurvLogloss$new(eps = 1e-15, id = "surv.logloss")

Arguments

eps

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

id

(character(1))
Identifier for the new instance.


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.