Scoring rules for probabilistic forecast evaluation.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | de60b9174174975d1ced5de3bd62822ef51b3eb0fa8b2a0866068b9df0296e2c |
|
MD5 | 96d9da0a864eea85881c6c2c4e84fb63 |
|
BLAKE2b-256 | c9f7343e62dd9a5f81722d32b7a45d9886ca4e71d17c875f9294180c8d0567f5 |
File details
Details for the file scoringrules-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: scoringrules-0.7.1-py3-none-any.whl
- Upload date:
- Size: 73.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f253ac4196c98773adf8024fa6f56c79c3b67c691412da19675c8c16b3f61e |
|
MD5 | 356a48210ec5f9a47beeacdb459831fe |
|
BLAKE2b-256 | 79ed11099a8096ea2bb2188d93411d757cb16591c2197451aaf232f5d248ed06 |