scoringrules.crps_logistic#
- scoringrules.crps_logistic(obs: ArrayLike, mu: ArrayLike, sigma: ArrayLike, *, backend: Backend = None) ArrayLike#
Compute the closed form of the CRPS for the logistic distribution.
It is based on the following formulation from [1]:
\[\mathrm{CRPS}(\mathcal{L}(\mu, \sigma), y) = \sigma \left\{ \omega - 2 \log F(\omega) - 1 \right\},\]where \(F(\omega)\) is the CDF of the standard logistic distribution at the normalized prediction error \(\omega = \frac{y - \mu}{\sigma}\).
- Parameters:
- obsarray_like
Observed values.
- mu: array_like
Location parameter of the forecast logistic distribution.
- sigma: array_like
Scale parameter of the forecast logistic distribution.
- Returns:
- crpsarray_like
The CRPS for the Logistic(mu, sigma) forecasts given the observations.
References
[1]Jordan, A., Krüger, F., & Lerch, S. (2019). Evaluating Probabilistic Forecasts with scoringRules. Journal of Statistical Software, 90(12), 1-37. https://doi.org/10.18637/jss.v090.i12
Examples
>>> import scoringrules as sr >>> sr.crps_logistic(0.0, 0.4, 0.1) 0.3036299855835619