Skip to main content

dark banner light banner

Probabilistic forecast evaluation

CI codecov pypi

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 when installed), 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 scoringRules served 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 scores similarly provides a comprehensive collection of forecast evaluation methods.

Metadata

Release files for scoringrules 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scoringrules 0.12.0
File Size Uploaded Provenance Actions
scoringrules-0.12.0.tar.gz 271.8 kB With provenance Details for scoringrules-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scoringrules 0.12.0
File Interpreter ABI Platform Actions
scoringrules-0.12.0-py3-none-any.whl Python 3 none any Details for scoringrules-0.12.0-py3-none-any.whl

Total release size: 388.3 kB

Release files / scoringrules-0.12.0.tar.gz

Download URL scoringrules-0.12.0.tar.gz
Size 271.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d18b7eae84030dc0932cb0c9b6eabcab12cc5fe1f2359bcdce3c983b1daf7639
BLAKE2b-256 checksum
How to use checksums
0655856e2021374fa30c2a9cd3ae208c26c1a67bbd7a3da7f4dd71e8efc31b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Release files / scoringrules-0.12.0-py3-none-any.whl

Download URL scoringrules-0.12.0-py3-none-any.whl
Size 116.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5d149d01c2d7aaf9ae7ba4dae17695a59237069189e3541ac8088ddbf96c7cb
BLAKE2b-256 checksum
How to use checksums
2cde1f09d9f2de39a2c46a57b700bad49653c74263e1e07fdcee6da8bec18f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Security for scoringrules 0.12.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scoringrules-0.12.0.tar.gz

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 Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page