Skip to contents

Mean squared difference between the predicted probability and the observation (1 = presence, 0 = absence): mean((pred - obs)^2), from 0 (perfect) to 1. This is the common binary form, half of Brier's original definition summed over both classes (Silva Filho et al. 2023).

Usage

brier_score(obs, pred)

Arguments

obs

Numeric vector of observations (1 = presence, 0 = absence).

pred

Numeric vector of predicted suitability.

Value

A single number.

Details

Limits. With background points it does not measure probability calibration: the background includes unrecorded presences, and its share sets the apparent prevalence.

References

Silva Filho, T., Song, H., Perello-Nieto, M., Santos-Rodriguez, R., Kull, M., Flach, P. (2023) Classifier calibration: a survey on how to assess and improve predicted class probabilities. Machine Learning 112, 3211-3260. doi:10.1007/s10994-023-06336-7

Examples

brier_score(c(1, 1, 0, 0), c(0.9, 0.6, 0.7, 0.1))
#> [1] 0.1675