skillfed

MAPIE

A scikit-learn-compatible module for estimating prediction intervals.

mapie v1.5.0 216.2K downloads/30d#9,386 on PyPI1,579
Permissive license BSD-3-Clause Active released

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 mapie

uv

uv add mapie

poetry

poetry add mapie

Installing 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

Intended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Software Development

Tags

prediction intervals uncertainty quantificationconformal prediction pythonmodel uncertainty estimationprediction sets classificationrisk control machine learningdistribution-free inferenceuncertainty quantification library
uncertainty-quantificationconformal-predictionrisk-control

More Software Development packages