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.7.1.tar.gz (499.6 kB view details)

Uploaded Source

Built Distribution

scoringrules-0.7.1-py3-none-any.whl (73.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scoringrules-0.7.1.tar.gz
  • Upload date:
  • Size: 499.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.17

File hashes

Hashes for scoringrules-0.7.1.tar.gz
Algorithm Hash digest
SHA256 de60b9174174975d1ced5de3bd62822ef51b3eb0fa8b2a0866068b9df0296e2c
MD5 96d9da0a864eea85881c6c2c4e84fb63
BLAKE2b-256 c9f7343e62dd9a5f81722d32b7a45d9886ca4e71d17c875f9294180c8d0567f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scoringrules-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94f253ac4196c98773adf8024fa6f56c79c3b67c691412da19675c8c16b3f61e
MD5 356a48210ec5f9a47beeacdb459831fe
BLAKE2b-256 79ed11099a8096ea2bb2188d93411d757cb16591c2197451aaf232f5d248ed06

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