skillfed

betacal

Beta calibration

betacal v1.1.0 423.8K downloads/30d#6,768 on PyPI31
Permissive license MIT DORMANT released

What it is and what it does

Betacal provides a BetaCalibration class that fits probabilistic calibration models to classifier predictions. It takes predicted probabilities from a classifier and learns a transformation that maps them to better-calibrated confidence estimates, useful when you need reliable probability outputs rather than just class predictions.

The package depends on numpy for numerical operations and scikit-learn for machine learning utilities. It is designed as a post-processing step: you train your classifier separately, then use betacal to recalibrate its probability outputs on a validation set before applying it to test data.

Use it for:

  • Recalibrate neural network or ensemble classifier probabilities to improve confidence reliability in production systems.
  • Adjust predicted probabilities from imbalanced classifiers to better reflect true class likelihood.
  • Post-process classifier outputs when you need well-calibrated confidence scores for decision-making.
  • Improve probability estimates from models trained on small datasets where calibration is often poor.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Fits beta calibration models to classifier outputs, transforming predicted probabilities into better-calibrated confidence estimates.

Yes, if you need classifier calibration and can tolerate dormant maintenance. The package is lightweight, has no known vulnerabilities, and solves a specific problem well. However, verify compatibility with your numpy and scikit-learn versions before relying on it in production, given the last release was April 2021.

Install

betacal on PyPI

pip

pip install betacal

uv

uv add betacal

poetry

poetry add betacal

Installing betacal

Before you install

Low friction install with only numpy and scikit-learn as dependencies. Dormant maintenance since April 2021; last commit February 2024 indicates minimal active development, though the repository remains available.

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

pip install betacal
import betacal
from betacal import BetaCalibration
bc = BetaCalibration()
bc.fit(y_true, y_pred)
calibrated_probs = bc.predict(y_pred)

Verify before relying

  • Whether the package works with modern scikit-learn and numpy versions (last release April 2021)
  • Python version compatibility (requires_python field is empty in metadata)

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — numpy, scikit-learn
Maintenance dormant — 1,961 days since the last release
Last repo commit
First released
Downloads 423,794/month — #6,768 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: betacal-1.1.0-py3-none-any.whl

Keywords: classifier calibration, calibration, classification

Tags

classifier probability calibrationbeta calibration modelcalibrate prediction confidenceprobability calibration pythonclassifier confidence adjustmentcalibration machine learning
calibrationclassifier-tuning

More Artificial Intelligence packages