No project description provided
Project description
probability-calibration
Probability calibration is a technique to calibrate the probabilities of a classifier. This package provides a simple interface to calibrate the probabilities of a sklearn-stype classifier. The package also provides a set of calibration methods.
Methods
- Platt Scaling
- Isotonic Regression
- Inductive Venn-Abers Predictor (IVAP)
- Cross Venn-Abers Predictor (CVAP)
Installation
$ pip install pcalibration
Usage
from pcalibration import CalibratorWrapper, CrossVennAbers
# Load the data
X_train, X_test, y_train, y_test = ...
# Create a CalibratorWrapper object
calibrator = CalibratorWrapper(model, CrossVennAbers(k=5))
# Fit the calibrator
calibrator.fit(X_train, y_train)
# Predict the probabilities
y_pred = calibrator.predict_proba(X_test)
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
pcalibration-0.1.2.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for pcalibration-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef588d38db3d1ba8dd2d0352853fb45a809a443ea784283910324fcdb9c8d821 |
|
MD5 | 3f03a40982fb49b7807880964fdac592 |
|
BLAKE2b-256 | 1d52acd8430415f4967c0305827e6ae4ce6b10e4cd8dbe75c2398f10cf19ac7e |