Classification measure defined as $$ -\frac{1}{n} \sum_{i=1}^n \log \left( p_i \right ) $$ where \(p_i\) is the probability for the true class of observation \(i\).

Note

The score function calls mlr3measures::logloss() from package mlr3measures.

If the measure is undefined for the input, NaN is returned. This can be customized by setting the field na_value.

Dictionary

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

mlr_measures$get("logloss")
msr("logloss")

Meta Information

  • Type: "classif"

  • Range: \([0, \infty)\)

  • Minimize: TRUE

  • Required prediction: prob

See also