logLoss: Mean Log Loss

Description Usage Arguments See Also Examples

Description

logLoss computes the average log loss between two numeric vectors.

Usage

1
logLoss(actual, predicted)

Arguments

actual

The ground truth binary numeric vector containing 1 for the positive class and 0 for the negative class.

predicted

A numeric vector of predicted values, where the values correspond to the probabilities that each observation in actual belongs to the positive class

See Also

ll

Examples

1
2
3
actual <- c(1, 1, 1, 0, 0, 0)
predicted <- c(0.9, 0.8, 0.4, 0.5, 0.3, 0.2)
logLoss(actual, predicted)

Example output

[1] 0.4196267

Metrics documentation built on May 1, 2019, 10:11 p.m.

Related to logLoss in Metrics...