MAPIE API¶
Regression¶
|
Prediction interval with out-of-fold conformity scores. |
This class implements the conformalized quantile regression strategy as proposed by Romano et al. (2019) to make conformal predictions. |
|
Prediction intervals with out-of-fold residuals for time series. |
Classification¶
|
Prediction sets for classification. |
Multi-Label Classification¶
Prediction sets for multilabel-classification. |
Calibration¶
|
Calibration for multi-class problems. |
Metrics¶
Effective coverage score obtained by the prediction sets. |
|
Effective coverage score obtained by the prediction sets. |
|
Mean width of prediction set output by |
|
|
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 alpha the Size-Stratified Coverage [3]: returns the maximum violation of the conditional coverage (with the groups defined). |
|
Compute the cumulative difference between y_true and y_score, both ordered according to y_scores array. |
|
The expected calibration error, which is the difference between the confidence scores and accuracy per bin [1]. |
|
Compute the square root of the hsic coefficient. |
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). |
|
|
Effective coverage score obtained by the prediction intervals. |
|
Effective coverage score 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 alpha the Size-Stratified Coverage [3]: returns the maximum violation of the conditional coverage (with the groups defined). |
|
Compute Spiegelhalter statistic p-value. |
|
Compute Spiegelhalter's statistic for calibration test. |
|
The Top-Label ECE which is a method adapted to fit the ECE to a Top-Label setting [2]. |
Conformity scores (regression)¶
|
Base conformity score class for regression task. |
Absolute conformity score. |
|
Gamma conformity score. |
|
Residual Normalised score. |
Conformity scores (classification)¶
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 |
|
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. |
Resampling¶
|
Generate a sampling method, that block bootstraps the training set. |
|
Generate a sampling method, that resamples the training set with possible bootstraps. |
Mondrian¶
|
Mondrian is a method for making conformal predictions for partition of individuals. |