logLoss {ModelMetrics}R Documentation

Log Loss

Description

Calculates the log loss or entropy loss for a binary outcome

Usage

logLoss(actual, predicted, distribution = "binomial")

Arguments

actual

a binary vector of the labels

predicted

a vector of predicted values

distribution

the distribution of the loss function needed binomial, poisson

Examples

data(testDF)
glmModel <- glm(y ~ ., data = testDF, family="binomial")
Preds <- predict(glmModel, type = 'response')

logLoss(testDF$y, Preds)


[Package ModelMetrics version 1.1.0 Index]