betacal
Beta calibration
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 betacaluv
uv add betacalpoetry
poetry add betacalInstalling 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
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
forestciComputes confidence intervals and variance…
permissive · top 15,000 on PyPI
empirical-calibrationComputes empirical calibration weights to…
permissive · top 15,000 on PyPI
ngboostNGBoost implements Natural Gradient Boosting…
permissive · top 15,000 on PyPI
limeLime explains individual predictions from any…
permissive · top 15,000 on PyPI
piecewise-regressionFits piecewise linear regression models to data…
permissive · top 15,000 on PyPI
mgwrCalibrates multiscale and traditional…
permissive · top 15,000 on PyPI
spark-sklearnDistributes scikit-learn model training and…
permissive · top 15,000 on PyPI
imbalanced-learnProvides re-sampling techniques to address…
permissive · top 5,000 on PyPI