Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logLoss

Log Loss/Binary Cross Entropy


Description

Calculates weighted logloss resp. cross entropy. Equals half of the unit Bernoulli deviance. The smaller, the better.

Usage

logLoss(actual, predicted, w = NULL, ...)

Arguments

actual

Observed values (0 or 1).

predicted

Predicted values strictly larger than 0 and smaller than 1.

w

Optional case weights.

...

Further arguments passed to weighted_mean.

Value

A numeric vector of length one.

See Also

Examples

logLoss(c(0, 0, 1, 1), c(0.1, 0.1, 0.9, 0.8))
logLoss(c(1, 0, 0, 1), c(0.1, 0.1, 0.9, 0.8))
logLoss(c(0, 0, 1, 1), c(0.1, 0.1, 0.9, 0.8), w = 1:4)

MetricsWeighted

Weighted Metrics, Scoring Functions and Performance Measures for Machine Learning

v0.5.2
GPL (>= 2)
Authors
Michael Mayer [aut, cre, cph], Christian Lorentzen [ctb, rev]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.