scoringrules.brier_score#
- scoringrules.brier_score(obs: ArrayLike, fct: ArrayLike, *, backend: Backend = None) Array#
Brier Score
The Brier Score is defined as
\[\text{BS}(F, y) = (F - y)^2,\]where \(F \in [0, 1]\) is the predicted probability of an event and \(y \in \{0, 1\}\) is the outcome [1].
- Parameters:
- obsarray_like
Observed outcomes, either 0 or 1.
- fctarray_like
Forecast probabilities, between 0 and 1.
- backendstr
The name of the backend used for computations. Default is ‘numpy’.
- Returns:
- scorearray_like
The computed Brier Score.
References
[1]Brier, G. W. (1950). Verification of forecasts expressed in terms of probability. Monthly Weather Review, 78, 1-3.
Examples
>>> import scoringrules as sr >>> sr.brier_score(1, 0.2) 0.64000