powered by
Calculates weighted average of unit Bernoulli deviance. Defined as twice logLoss. The smaller the deviance, the better.
deviance_bernoulli(actual, predicted, w = NULL, ...)
A numeric vector of length one.
Observed values (0 or 1).
Predicted values strictly between 0 and 1.
Optional case weights.
Further arguments passed to logLoss.
logLoss
logLoss.
deviance_bernoulli(c(0, 0, 1, 1), c(0.1, 0.1, 0.9, 0.8)) deviance_bernoulli(c(0, 0, 1, 1), c(0.1, 0.1, 0.9, 0.8), w = 1:4)
Run the code above in your browser using DataLab