BrierScore: Brier Score for Assessing Prediction Accuracy

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/LinMod.R

Description

Calculate Brier score for assessing the quality of the probabilistic predictions of binary events.

Usage

1
2
3
4
5
6
7
BrierScore(...)

## S3 method for class 'glm'
BrierScore(x, scaled = FALSE, ...)

## Default S3 method:
BrierScore(resp, pred, scaled = FALSE, ...)

Arguments

x

a glm object

resp

the response variable

pred

the predicted values

scaled

logical, defining if scaled or not. Default is FALSE.

...

further arguments to be passed to other functions.

Details

The Brier score is a proper score function that measures the accuracy of probabilistic predictions. It is applicable to tasks in which predictions must assign probabilities to a set of mutually exclusive discrete outcomes. The set of possible outcomes can be either binary or categorical in nature, and the probabilities assigned to this set of outcomes must sum to one (where each individual probability is in the range of 0 to 1).

It's calculated as

1/n sum(p_i - o_i)^2, where p_i...predicted probability and o_i...observed value out of (0,1)

The lower the Brier score is for a set of predictions, the better the predictions are calibrated. Note that the Brier score, in its most common formulation, takes on a value between zero and one, since this is the largest possible difference between a predicted probability (which must be between zero and one) and the actual outcome (which can take on values of only 0 and 1). (In the original (1950) formulation of the Brier score, the range is double, from zero to two.)

Value

a numeric value

Author(s)

Andri Signorell <andri@signorell.net>

References

Brier, G. W. (1950) Verification of forecasts expressed in terms of probability. Monthly Weather Review, 78, 1-3.

See Also

Conf

Examples

1
2
3
r.glm <- glm(Survived ~ ., data=Untable(Titanic), family=binomial)

BrierScore(r.glm)

AndriSignorell/DescTools documentation built on April 8, 2021, 5:51 a.m.