MAPIE
A scikit-learn-compatible module for estimating prediction intervals.
What it is and what it does
MAPIE is a scikit-learn-compatible library for quantifying uncertainty in machine learning predictions using conformal prediction and distribution-free inference methods. It computes prediction intervals for regression and classification tasks, as well as prediction sets for more complex scenarios like multi-label classification and image segmentation. The library implements peer-reviewed algorithms with theoretical guarantees under minimal assumptions.
The core workflow involves fitting a model on training data, then using a separate conformalization dataset to estimate prediction intervals or sets that provide probabilistic coverage guarantees. MAPIE also supports risk control, allowing you to set and enforce bounds on metrics like recall and precision. It depends on numpy, scikit-learn, and scipy, and is actively maintained with recent feature additions for emerging use cases.
Use it for:
- Generate prediction intervals for regression models to quantify forecast uncertainty and communicate confidence bounds.
- Compute prediction sets for classification to provide multiple plausible labels with statistical coverage guarantees.
- Control false positive or false negative rates in high-stakes tasks by enforcing bounds on precision and recall.
- Validate model reliability on new data by testing exchangeability assumptions before applying conformal methods.
- Build uncertainty-aware computer vision pipelines for semantic segmentation with guaranteed metric bounds.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
MAPIE computes prediction intervals and prediction sets for regression, classification, and time series, and controls risks for complex tasks like multi-label classification and semantic segmentation using conformal prediction methods.
Yes. MAPIE is actively maintained, has low install friction, carries no known vulnerabilities, and provides a theoretically grounded approach to uncertainty quantification. It is worth installing if you need prediction intervals, prediction sets, or risk control for regression, classification, or computer vision tasks.
Install
mapie on PyPI
pip
pip install mapieuv
uv add mapiepoetry
poetry add mapieInstalling MAPIE
Before you install
Low friction installation with a pure Python wheel. Actively maintained with a release 9 days old and recent commits. Depends on three standard scientific packages: numpy, scikit-learn, and scipy.
License in practice
BSD-3-Clause is permissive; you can use MAPIE in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.
Quickstart
pip install mapie
from mapie.regression import MapieRegressor
model = MapieRegressor(base_estimator=None)
model.fit(X_train, y_train)
y_pred, y_pi = model.predict(X_test)
Requires Python >=3.10; scikit-learn >=1.4 and numpy >=1.23 must be installed.
Verify before relying
- Whether the library's theoretical guarantees hold for all data distributions or only under specific exchangeability assumptions.
- Performance overhead of conformal prediction methods on large datasets compared to point predictions alone.
- Compatibility with TensorFlow and PyTorch models beyond scikit-learn wrappers.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, scikit-learn, scipy |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 216,153/month — #9,386 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mapie-1.5.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
forestciComputes confidence intervals and variance…
permissive · top 15,000 on PyPI
SALibSALib implements global sensitivity analysis…
permissive · top 15,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
ngboostNGBoost implements Natural Gradient Boosting…
permissive · top 15,000 on PyPI
tensorflow-probabilityTensorFlow Probability provides probabilistic…
permissive · top 5,000 on PyPI
uncertaintiesPerforms arithmetic and mathematical operations…
permissive · top 5,000 on PyPI
carolinaCarolina is a Python wrapper around Dakota, a…
permissive · top 15,000 on PyPI
sktimesktime provides a unified interface for time…
permissive · top 5,000 on PyPI
hierarchicalforecastReconciles hierarchical time-series forecasts…
permissive · top 15,000 on PyPI
cartoboostCartoBoost is a Rust-backed gradient boosting…
permissive · top 15,000 on PyPI