mtr_brier_score: Brier score

Description Usage Arguments Value Author(s) See Also Examples

View source: R/brier-score.r

Description

Brier score measures the accuracy of probabilistic predictions; the smaller the Brier score, the better. The Brier score always takes on a value between zero and one.

Given N predictions, the Brier score is defined by the mean squared difference between (1) the estimated probability assigned to the possible outcome and (2) the actual outcome.

Here is a few examples that help the interpretation of Brier score.

Suppose that one is forecasting the probability P that it will rain on a given day. Then the Brier score is calculated as follows:

Usage

1
mtr_brier_score(actual, predicted)

Arguments

actual

[numeric] Ground truth binary numeric vector containing 1 for the positive class and 0 for the negative class.

predicted

[numeric] A vector of estimated probabilities.

Value

A scalar numeric output

Author(s)

An Chu

See Also

mtr_log_loss mtr_mean_log_loss

Examples

1
2
3
act <- c(0, 1, 1, 0)
pred <- c(0.1, 0.9, 0.8, 0.3)
mtr_brier_score(act, pred)

chuvanan/metrics documentation built on Nov. 4, 2019, 8:52 a.m.