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

Uploaded Source

Built Distribution

scoringrules-0.7.0-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scoringrules-0.7.0.tar.gz
Algorithm Hash digest
SHA256 723c5ea58efb8f53b758fb679c5acb6f2b0db65fdea89b123bc425474ec29212
MD5 c790e96adcd5e55acb18618442291678
BLAKE2b-256 e4d1c5f7eafff016747c89f95b955f5fe38ef2aad7322c8151a98ca71a9a582f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scoringrules-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d32298fdfe0c2eca61c14236443bc694c77710abdf5514f4fe12ec5afe16919
MD5 9523187eaf172ef5168666e34f71f554
BLAKE2b-256 6847bda9510da9b5f9cca1b1e4e610132acb50bbdce09d1398aa5268f51240d3

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