Quick Start with MAPIE
This package allows you to easily estimate uncertainties in both regression and classification settings. In regression settings, MAPIE provides prediction intervals on single-output data. In classification settings, MAPIE provides prediction sets on multi-class data. In any case, MAPIE is compatible with any scikit-learn-compatible estimator.
1. Download and install the module
Install via pip:
pip install mapie
or via conda:
$ conda install -c conda-forge mapie
To install directly from the github repository :
pip install git+https://github.com/scikit-learn-contrib/MAPIE
2. Regression
Let us start with a basic regression problem. Here, we generate one-dimensional noisy data that we fit with a MLPRegressor: Plot prediction intervals
3. Classification
Similarly, it’s possible to do the same for a basic classification problem: Plot prediction sets
4. Risk Control
MAPIE implements risk control methods for multilabel classification (in particular, image segmentation) and binary classification: Precision control for a binary classifier