Predictive Uncertainty Quantification via Risk Decompositions for Strictly Proper Scoring Rules
This repository contains code for the paper "Predictive Uncertainty Quantification via Risk Decompositions for Strictly Proper Scoring Rules," submitted to NeurIPS 2024.
UV
We use uv to manage dependecies. You can find an installation guide and documentation here.
Install uv
For Linux/MacOS the following line will install uv on your system:
curl -LsSf https://astral.sh/uv/install.sh | sh
Install dependencies
All the commands should be executed from the folder with pyproject.toml file
To install dependencies from pyproject.toml file using
uv sync
It will create a .venv folder, that will contain a virtual environment and all the needed dependencies.
Run python script
uv installs dependencies in special virutal env, that is located in .venv/. To run any python code snippet with it you should run:
uv run python ...
e.g.
cd experiments/laplace
uv run python main.py -f checkpoints/resnet18_ce.pth -d cifar10_one_batch -v
Repository Structure
The repository is organized as follows:
Experiments
This folder contains different experiments related to the paper.
- cifar10: Contains training scripts for cifar10 dataset.
- laplace: Contains inference scripts for Laplace Redux – Effortless Bayesian Deep Learning model.
Embedding Extraction
- source/source/evaluation_utils.py: Script to extract embeddings after the ensembles are trained.
Notebooks
Folder notebooks/ have notebooks with data analysis of experiments.
- joint_tables.ipynb: Prepares comprehensive pandas tables for both problems.
- ood_analysis.ipynb: Generates plots for the OOD problem.
- ood_visualizations.ipynb: Creates visualizations for the OOD problem.
- mis_analysis.ipynb: Generates plots for the misclassification problem.
- mis_visualizations.ipynb: Creates visualizations for the misclassification problem.
Notes on Trained Models
Due to a supplementary material size limit of 100MB, we cannot include the trained models in this repository. However, we are ready to provide them through any resource that maintains anonymity upon request.
Metadata
Release files for psruq-python 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psruq_python-0.0.4.tar.gz | 2.5 MB | Without provenance | Details for psruq_python-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psruq_python-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for psruq_python-0.0.4-py3-none-any.whl |
Total release size: 2.5 MB
Release files / psruq_python-0.0.4.tar.gz
| Download URL | psruq_python-0.0.4.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9332b8d44622d0781228da15b0e55b575b7745653f424036cb3393b786e1659
|
|
BLAKE2b-256 checksum How to use checksums |
ce73f91acb51c21b8441cbd191e3169fe96c8ab055b34dbc95a07f1957e4b47d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.18
|
Release files / psruq_python-0.0.4-py3-none-any.whl
| Download URL | psruq_python-0.0.4-py3-none-any.whl |
|---|---|
| Size | 37.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50fea844a6c03a37cda3e556487455d7fa7d5fe9c216d780d23da947505a841d
|
|
BLAKE2b-256 checksum How to use checksums |
afa38e2f467112826925c5b9ee81b45597f535ba2959371811c7ef72ceffd4f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.18
|
Security for psruq-python 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.