log_score: Log Score

View source: R/LogisticRegression.R

log_scoreR Documentation

Log Score

Description

Log score diagnostic based on probabilities of predicting the correct class

Usage

log_score(p, y)

Arguments

p

a vector of probabilities

y

a vector of the true observed response variable

Details

The log score is defined as

LS = 1/n \sum - log p (z)

where p(z) is the probability of predicting the correct value z. This is averaged over all data points.

The log score penalises probabilities that the model assigns to the correct class that are low, and rewards those that are high in the correct place.

Value

a single value, the mean of the negative log of the probabilities for predicting the correct class


dannyjameswilliams/danielR documentation built on Aug. 20, 2023, 3:25 a.m.