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
pip install --upgrade jaxlib
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}
}
Examples
You can find some examples on how to use this package in the folder examples
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
dirichletcal-0.2.dev1.tar.gz
(10.8 kB
view details)
File details
Details for the file dirichletcal-0.2.dev1.tar.gz
.
File metadata
- Download URL: dirichletcal-0.2.dev1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9273e6a3ce67d91363ea525e393f195b4400c6b1aa1a8f9be9a4ca8f42f0a3cf |
|
MD5 | 6d5b6a6f54456499cbc18700373c8747 |
|
BLAKE2b-256 | e34dc897e3f71426d36a20e28da1b7ac7bee020a25275c4d80bad2e98677483c |