This function computes the Logarithmic loss.

metrics.logloss(preds, labels, eps = 1e-15)

Arguments

preds

Type: numeric. The predictions.

labels

Type: numeric. The labels (0, 1).

eps

Type: numeric. The shrinkage to apply between the 0 and 1's bounds.

Value

The Logarithmic loss.

Examples

set.seed(11111) metrics.logloss(preds = runif(10000, 0, 1), labels = round(runif(10000, 1)))
#> [1] 0.9969976