Probabilistic forecast evaluation
scoringrules is a python library that provides scoring rules to evaluate probabilistic forecasts.
Its original goal was to reproduce the functionality of the R package
scoringRules in python,
thereby allowing forecasting practitioners working in python to enjoy the same tools as those
working in R. The methods implemented in scoringrules are therefore based around those
available in scoringRules, which are rooted in the scientific literature on probabilistic forecasting.
The scoring rules available in scoringrules include, but are not limited to, the
- Brier Score
- Logarithmic Score
- (Discrete) Ranked Probability Score
- Continuous Ranked Probability Score (CRPS)
- Dawid-Sebastiani Score
- Energy Score
- Variogram Score
- Gaussian Kernel Score
- Threshold-Weighted CRPS
- Threshold-Weighted Energy Score
Features
- Fast computation of several probabilistic univariate and multivariate verification metrics
- Multiple backends: support for numpy (accelerated with numba), jax and pytorch
- Didactic approach to probabilistic forecast evaluation through clear code and documentation
Installation
Requires python >=3.12.
pip install scoringrules
Documentation
Learn more about scoringrules in its official documentation at https://scoringrules.readthedocs.io/en/latest/.
Quick example
import scoringrules as sr
import numpy as np
obs = np.random.randn(100)
fct = obs[:,None] + np.random.randn(100, 21) * 0.1
sr.crps_ensemble(obs, fct)
Citation
If you found this library useful, consider citing:
@software{zanetta_scoringrules_2024,
author = {Francesco Zanetta and Sam Allen},
title = {scoringrules: a python library for probabilistic forecast evaluation},
year = {2024},
url = {https://github.com/frazane/scoringrules}
}
Acknowledgements
- The widely-used R package
scoringRulesserved as a reference for this library, which greatly facilitated our work. We are additionally grateful for fruitful discussions with the authors. - The quality of this library has also benefited a lot from discussions with (and contributions from)
Nick Loveday and Tennessee Leeuwenburg, whose python library
scoressimilarly provides a comprehensive collection of forecast evaluation methods.
Metadata
Release files for scoringrules 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scoringrules-0.11.0.tar.gz | 194.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scoringrules-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 291.0 kB
Release files / scoringrules-0.11.0.tar.gz
| Download URL | scoringrules-0.11.0.tar.gz |
|---|---|
| Size | 194.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
434d53c292bc319d080657dfdda99a3f6a5ceac45687d0f1218f8180e02a259d
|
|
BLAKE2b-256 checksum How to use checksums |
e22c645ef0174c26c2eccffc65596a29f2b3eb61daf441ac1ba79dd71611cc14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.
Transparency logRelease files / scoringrules-0.11.0-py3-none-any.whl
| Download URL | scoringrules-0.11.0-py3-none-any.whl |
|---|---|
| Size | 96.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6371a36c856a8055b6751dc401a7e20000f0fd2886d602c90ee35ee0bc8ebb4e
|
|
BLAKE2b-256 checksum How to use checksums |
efc2646ebbc8a8b9df9244a76c8a523f7e768857ce3abd1c6bd4740470fd6b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.
Transparency log