Skip to main content

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


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)

Uploaded Source

Built Distribution

pcalibration-0.1.2-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page