2
$\begingroup$

so I am using this logloss function

logLoss = function(pred, actual){
-1*mean(log(pred[model.matrix(~ actual + 0) - pred > 0]))
} 

sometimes it is correctly giving me answers like 1.156051, 0.8714408 or 1.155732. However this time it gave Inf (Infinity) as answer. How do I correctly calculate or interpret it. My outcome variable is dichotomous, i.e. 1 or 0. Please help.

$\endgroup$

1 Answer 1

2
$\begingroup$

Logloss as you have given it should be equivalent to a binomial likelihood. So loss $\infty$ (corresponding to loglikeihood $-\infty$ means that the observations are incompatible with the model---something happened that the model says has probability zero.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.