“MAPIE” Explained Exactly How You Wished Someone Explained to You
A Python library that turns the predictions of any model into confidence intervals
When you build a predictive model for a numeric target variable, classical Python libraries such as Scikit-learn, XGBoost, LightGBM, CatBoost, Keras yield point predictions. Unfortunately,
Point predictions are always wrong.
In fact, suppose that you have a model that predicts the selling price of houses in San Francisco. The model has predicted that a house will be sold at 746,632.15 $. What are the chances that this will be the actual price, down to the last cent? Practically speaking, zero.
It is much more useful (and safe) to know that the house will be sold at a price between 700k $ and 800k $ with 95% confidence. Where 95% confidence roughly means that — if we could observe all the possible universes — the selling price would actually be between 700k $ and 800k $ in 95% of the cases. This is called an interval prediction.
So, how do we get an interval prediction from a point prediction in Python? This is where MAPIE comes into play.