MAPIE API
Regression
Conformalizers
Computes prediction intervals using the split conformal regression technique: |
|
Computes prediction intervals using the cross conformal regression technique: |
|
Computes prediction intervals using the jackknife-after-bootstrap technique: |
|
Computes prediction intervals using the conformalized quantile regression technique: |
|
Prediction intervals with out-of-fold residuals for time series. |
Metrics
Effective coverage obtained by the prediction intervals. |
|
Effective mean width score obtained by the prediction intervals. |
|
Compute Size-Stratified Coverage metrics proposed in [3] that is the conditional coverage conditioned by the size of the intervals. |
|
Aggregate by the minimum for each confidence level the Size-Stratified Coverage [3]: returns the maximum violation of the conditional coverage (with the groups defined). |
|
|
Compute the square root of the hsic coefficient. |
Coverage Width-based Criterion (CWC) obtained by the prediction intervals. |
|
The Winkler score, proposed by Winkler (1972), is a measure used to evaluate prediction intervals, combining the length of the interval with a penalty that increases proportionally to the distance of an observation outside the interval. |
Conformity Scores
Base conformity score class for regression task. |
|
Absolute conformity score. |
|
Gamma conformity score. |
|
Residual Normalised score. |
Resampling
Generate a sampling method, that block bootstraps the training set. |
|
|
Generate a sampling method, that resamples the training set with possible bootstraps. |
Classification
Conformalizers
Computes prediction sets using the split conformal classification technique: |
|
Computes prediction sets using the cross conformal classification technique: |
Metrics
|
Effective coverage score obtained by the prediction sets. |
|
Mean width of prediction set output by mapie.classification._MapieClassifier. |
Compute Size-Stratified Coverage metrics proposed in [3] that is the conditional coverage conditioned by the size of the predictions sets. |
|
Aggregate by the minimum for each confidence level the Size-Stratified Coverage [3]: returns the maximum violation of the conditional coverage (with the groups defined). |
Conformity Scores
Base conformity score class for classification task. |
|
Naive classification non-conformity score method that is based on the cumulative sum of probabilities until the 1-alpha threshold. |
|
Least Ambiguous set-valued Classifier (LAC) method-based non conformity score (also formerly called "score"). |
|
Adaptive Prediction Sets (APS) method-based non-conformity score. |
|
Regularized Adaptive Prediction Sets (RAPS) method-based non-conformity score. |
|
Top-K method-based non-conformity score. |
Risk Control
Prediction sets for multilabel-classification. |
|
Controls the risk or performance of a binary classifier. |
|
Risk controller for semantic segmentation tasks, inheriting from MultiLabelClassificationController. |
|
Define a risk (or a performance metric) to be used with the BinaryClassificationController. |
|
Deprecated alias for |
Calibration
Conformalizer
Top-label calibration for multi-class problems. |
Metrics
The expected calibration error, which is the difference between the confidence scores and accuracy per bin [1]. |
|
The Top-Label ECE which is a method adapted to fit the ECE to a Top-Label setting [2]. |
|
Compute the cumulative difference between y_true and y_score, both ordered according to y_scores array. |
|
Compute the Kolmogorov-smirnov cumulative distribution function (CDF) for the float x. |
|
Compute Kolmogorov Smirnov p-value. |
|
Compute Kolmogorov-smirnov's statistic for calibration test. |
|
Compute the Kuiper cumulative distribution function (CDF) for the float x. |
|
Compute Kuiper statistic p-value. |
|
Compute Kuiper's statistic for calibration test. |
|
Compute the mean square root of the sum of s * (1 - s). |
|
Compute Spiegelhalter statistic p-value. |
|
Compute Spiegelhalter's statistic for calibration test. |
Utils
Split arrays or matrices into train, conformalization and test subsets. |