No project description provided
Project description
Cal-PIT
Full Documentation
Full documentation for the project is available on Read the Docs
Overview
calpit
is a Python package for diagnosing and recalibrating conditional density estimates. The package is built on top of Pytorch (with other ML backends to be added soon) and provides a simple and flexible interface matching the scikit-learn API.
Basic Usage
The following is a basic recipe for using the calpit
package:
from calpit import CalPit #import the CalPit class
calpit_model = CalPit(model=model) #Any Pytorch model CalPit class
trained_model = calpit_model.fit(x_calib,y_calib, cde_cali,y_grid) #Fit the model with a calibration dataset
pp_result = calpit_model.predict(x_test, cov_grid) #Predict the local PIT distribution for a test dataset
new_cde = calpit_model.transform(x_test, cde_test, y_grid) #Recalibrate the conditional density estimate for a test dataset
Installation
To install the current release of the package, you can run the following command:
pip install calpit
To install the latest version of the code from Github, you can run the following command:
pip install git+https://github.com/lee-group-cmu/Cal-PIT
If you would like to install the package for development purposes, you can clone the repository and install the package in editable mode:
>> git clone https://github.com/lee-group-cmu/Cal-PIT.git
>> cd Cal-PIT
>> pip install -e .
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 calpit-0.1.2.tar.gz
.
File metadata
- Download URL: calpit-0.1.2.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e93c049cf69f54e4ccb4870729579787154f3281614f80bf78ea41766e413dd |
|
MD5 | c720d85085f00482a9f0ad4cf5857716 |
|
BLAKE2b-256 | c811947811483c3bf02a0c816a5ab332e78ed81cac11e957b4cb195daf363606 |
File details
Details for the file calpit-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: calpit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5051653f8550ad4037dc2528e0a07da8cc5b5745feeed9bc73b540f3c7120e |
|
MD5 | 1c080f575a829ee546dd58d2569cd777 |
|
BLAKE2b-256 | bebe06d5a170a5a6ff266ff76d4c7a9e3fc86a293ea2ed6528bb434fc72ee47f |