Skip to main content

Python code for Dirichlet calibration

Project description

Dirichlet Calibration Python implementation

This is a Python implementation of the Dirichlet Calibration presented in Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with Dirichlet calibration at NeurIPS 2019.

Installation

# Clone the repository
git clone git@github.com:dirichletcal/dirichlet_python.git
# Go into the folder
cd dirichlet_python
# Create a new virtual environment with Python3
python3.6 -m venv venv
# Load the generated virtual environment
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install all the dependencies
pip install -r requirements.txt

Unittest

python -m unittest discover dirichletcal

Cite

If you use this code in a publication please cite the following paper

@inproceedings{kull2019dircal,
  title={Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with Dirichlet calibration},
  author={Kull, Meelis and Nieto, Miquel Perello and K{\"a}ngsepp, Markus and Silva Filho, Telmo and Song, Hao and Flach, Peter},
  booktitle={Advances in Neural Information Processing Systems},
  pages={12295--12305},
  year={2019}
}

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

dirichletcal-0.1.dev1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

dirichletcal-0.1.dev1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file dirichletcal-0.1.dev1.tar.gz.

File metadata

  • Download URL: dirichletcal-0.1.dev1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for dirichletcal-0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 2eff7717b7086cb192a3ebc06756702a4c5e17d679d9d279a2080e20ea2b35c1
MD5 7a770df568d0f69374a3a89942760c7b
BLAKE2b-256 18187be1fa63a6d0e42cb11449d61a455f6c46afa59bbcd36bfcf65db4d11147

See more details on using hashes here.

File details

Details for the file dirichletcal-0.1.dev1-py3-none-any.whl.

File metadata

  • Download URL: dirichletcal-0.1.dev1-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for dirichletcal-0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6d4258e6b1d7bba752c5d60fab9843489c892fbd2eec955b357e5fcb9cbef8
MD5 630620d7cd1111fab48ab53f82dc2dcf
BLAKE2b-256 e63d11d4e93c5b5d6cbdd1ed453a656ce9ac9481b7999edaf0ff4c14572aa52f

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