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.