Mondrian Conformal Prediction — Theoretical Description¶
Terminology
In theoretical parts of the documentation:
alphais equivalent to1 - confidence_level— it can be seen as a risk level.- calibrate and calibration are equivalent to conformalize and conformalization.
Mondrian Conformal Prediction (MCP) 1 is a method that builds prediction sets with a group-conditional coverage guarantee:
where \(G_{n+1}\) is the group of the new test point.
When to Use Mondrian¶
MCP can be used with any split conformal predictor and is particularly useful when you have prior knowledge about existing groups — whether the group information is in the features or not.
Classification Example
In a classification setting, groups can be defined as the predicted classes. This ensures the coverage guarantee is satisfied for each predicted class.
How It Works¶
MCP simply:
- Stratifies the data by group
- Applies split conformal prediction to each group separately
The quantile for each group:
where \(s_1, \ldots, s_{n^g}\) are the conformity scores of training points in group \(g\).
References¶
-
Vladimir Vovk, David Lindsay, Ilia Nouretdinov, and Alex Gammerman. "Mondrian confidence machine." Technical report, Royal Holloway University of London, 2003. ↩