Calculate deviance.

calcDeviance(pred, y, na.rm = FALSE, eps = 1e-06)

Arguments

pred

numeric predictions

y

logical truth

na.rm

logical, if TRUE remove NA values

eps

numeric, smoothing term

Value

deviance

Examples

sigr::calcDeviance(1:4,c(TRUE,FALSE,TRUE,TRUE))
#> [1] 27.63103