A scikit-learn-compatible module for estimating prediction intervals
MAPIE
MAPIE allows you to easily estimate prediction intervals on single-output data using your favourite scikit-learn-compatible regressor.
Prediction intervals output by MAPIE encompass both aleatoric and epistemic uncertainty and are backed by strong theoretical guarantees [1].
Requirements
Python 3.7+
MAPIE stands on the shoulders of giant.
Its only internal dependency is scikit-learn.
Installation
Install via pip:
pip install mapie
To install directly from the github repository :
pip install git+https://github.com/simai-ml/MAPIE
Quickstart
Let us start with a basic regression problem. Here, we generate one-dimensional noisy data that we fit with a linear model.
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.datasets import make_regression
regressor = LinearRegression()
X, y = make_regression(n_samples=500, n_features=1, noise=20, random_state=59)
Since MAPIE is compliant with the standard scikit-learn