Methods for evaluating and fixing calibration
Project description
Proper Scoring Rules for calibration.
This repository contains the code for doing calibration on multi-class and binary classification using various approaches. The core functionality was written by Niko Brummer. Sergio Alvarez and I later added various methods and scripts to experiment with them. Further, I have another repository called expected_cost with lots of examples on how to use the libraries in this repository.
How to install
pip install psrcal
When you do that, torch, matplotlib and other libraries will also be installed, unless you already have the required versions in your system. It does not install joblib and ternary, which are only needed to run the scripts in the experiments dir. If you want to run those scripts, you can install those two packages separately.
Alternatively, if you want the latest version of the code, you can:
-
Clone the repository:
git clone https://github.com/luferrer/psr-calibration.git
-
Install the requirements (this does install joblib and ternary since it assumes you are probably cloning the repo in order to run the scripts inside the experiments dir):
pip install -r requirements.txt
-
Add the resulting top directory in your PYTHONPATH. In bash this would be:
export PYTHONPATH=ROOT_DIR/psr-calibration:$PYTHONPATH
where ROOT_DIR is the absolute path (or the relative path from the directory where you have the scripts or notebooks you want to run) to the top directory from where you did the clone above.
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 psrcal-0.0.2.tar.gz
.
File metadata
- Download URL: psrcal-0.0.2.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01fd39b56b0cf4d9e78a1956c3a4e7c687e0d0fbfc68854a8c7231835a956257 |
|
MD5 | f45bfc3a3b1c79e35d505c982e74ad21 |
|
BLAKE2b-256 | f7f6a8288b419e8191edee24d5ac8bc8a1cff9f7029ddd911d2529a64a6cd8fe |
File details
Details for the file psrcal-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: psrcal-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57df3ff3e4700b673a4be7ae2b948006ea6db71990f7b6f40868cbc9ea7843a |
|
MD5 | 74c7e84de175e70941744a99e6e99583 |
|
BLAKE2b-256 | f8b5e680b51f694e0e758d226df59c4dcc40fa26f7bbc573803e700ae0f1dec0 |