--- id: mapie version: "1.5.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # MAPIE — A scikit-learn-compatible module for estimating prediction intervals. License: permissive · Maintenance: active · Downloads: 216.2K/mo ## 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 above — 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 pip install mapie uv add mapie 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_current - Install friction: low - Maintenance: active - Downloads: 216.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags prediction intervals uncertainty quantification, conformal prediction python, model uncertainty estimation, prediction sets classification, risk control machine learning, distribution-free inference, uncertainty quantification library, uncertainty-quantification, conformal-prediction, risk-control [View on SkillFed](https://skillfed.io/packages/mapie) · [View on PyPI](https://pypi.org/project/mapie/)