Skip to main content

Scoring rules for probabilistic forecast evaluation.

Project description


CI codecov pypi

Scoringrules is a python library for evaluating probabilistic forecasts by computing scoring rules and other diagnostic quantities. It aims to assist forecasting practitioners by providing a set of tools based the scientific literature and via its didactic approach.

Features

  • Fast computations of several probabilistic univariate and multivariate verification metrics
  • Multiple backends: support for numpy (accelerated with numba), jax, pytorch and tensorflow
  • Didactic approach to probabilistic forecast evaluation through clear code and documentation

Installation

Requires python >=3.10!

pip install scoringrules

Documentation

Learn more about scoringrules in its official documentation at https://frazane.github.io/scoringrules/.

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)

Metrics

  • Brier Score
  • Continuous Ranked Probability Score (CRPS)
  • Logarithmic score
  • Error Spread Score
  • Energy Score
  • Variogram Score

Citation

If you found this library useful for your own research, 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

scoringRules served as a reference for this library. The authors did an outstanding work which greatly facilitated ours. The implementation of the ensemble-based metrics as jit-compiled numpy generalized ufuncs was first proposed in properscoring, released under Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scoringrules-0.6.1.tar.gz (487.0 kB view details)

Uploaded Source

Built Distribution

scoringrules-0.6.1-py3-none-any.whl (61.5 kB view details)

Uploaded Python 3

File details

Details for the file scoringrules-0.6.1.tar.gz.

File metadata

  • Download URL: scoringrules-0.6.1.tar.gz
  • Upload date:
  • Size: 487.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for scoringrules-0.6.1.tar.gz
Algorithm Hash digest
SHA256 9d1fc4f216001713bbfd1dba1300cb536c3156a2023ac2d7d850f65394e22a15
MD5 d1bb54d7f2a3a35f3bac060266b83750
BLAKE2b-256 c5d555d20fada20b2accc3ee71301df214a9ad21c4154a91a9829fe9b075e301

See more details on using hashes here.

File details

Details for the file scoringrules-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: scoringrules-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 61.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for scoringrules-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d540c3637d05bd970a5ffd78764f3d5e041084c062c0403b73bdf6c8d3010d68
MD5 c6cb38e873cf640b86d1c641c6160bf2
BLAKE2b-256 32233c4d8c6afb3e39671817d6341cb10bb33355f4ff350839a3d69948a18d63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page