Skip to main content

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:

  1. Clone the repository:

    git clone https://github.com/luferrer/psr-calibration.git

  2. 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

  3. 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.

Metadata

Release files for psrcal 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psrcal 1.0.0
File Size Uploaded Provenance Actions
psrcal-1.0.0.tar.gz 12.5 kB Without provenance Details for psrcal-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for psrcal 1.0.0
File Interpreter ABI Platform Actions
psrcal-1.0.0-py3-none-any.whl Python 3 none any Details for psrcal-1.0.0-py3-none-any.whl

Total release size: 26.6 kB

Release files / psrcal-1.0.0.tar.gz

Download URL psrcal-1.0.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cf4d84294505e4f92189227c242087f2052aeb17b5b0217f37aa301620d75462
BLAKE2b-256 checksum
How to use checksums
bfe1afe7e0d7312c3d5e213eefaf6f1ba547439551fb7ee2f64813ab2405e5d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release files / psrcal-1.0.0-py3-none-any.whl

Download URL psrcal-1.0.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
115eae5355cddffe2210a03996d793af1a2d33cb330e26623dead6643cb398d0
BLAKE2b-256 checksum
How to use checksums
8335d715804f4111cd1220c8b2882ab90659891ea5f264e06c71eb2fd2b87598
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Security for psrcal 1.0.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page