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

Uploaded Source

Built Distribution

scoringrules-0.6.0-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scoringrules-0.6.0.tar.gz
  • Upload date:
  • Size: 487.8 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.0.tar.gz
Algorithm Hash digest
SHA256 0a8e31894557ade3396e1359fa11b2ef95a30c61d35104ff23fe90d611b8cf6a
MD5 042fa6dc9b53180a65a86192cc1e72ab
BLAKE2b-256 fff6122eb3e68c3fe3207c223de1faa28cd908687f8d78eb9c83ccb96a5f96fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scoringrules-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 61.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f78d6461aa842f1b33db691bbaacd990fb8044b1fb0c8066758b65e7faddad4f
MD5 ef717b4235b8a320c4f2c0ebef5918be
BLAKE2b-256 11bc78ccb8208b9080e0233f4bcc970ab826ce3093d8e24cd1cc614faca91a74

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