From c763b11e5a646a9e0791611b20297c51b50c233f Mon Sep 17 00:00:00 2001 From: Mohammed Jawhar Date: Mon, 14 Oct 2024 15:55:41 +0200 Subject: [PATCH 1/3] Fix: Correct EnbPI interval centering --- mapie/estimator/regressor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mapie/estimator/regressor.py b/mapie/estimator/regressor.py index a200586c..3ec9a66e 100644 --- a/mapie/estimator/regressor.py +++ b/mapie/estimator/regressor.py @@ -565,13 +565,17 @@ def predict( elif self.method == "plus": y_pred_multi_low = y_pred_multi y_pred_multi_up = y_pred_multi - else: + elif self.method != "enbpi": y_pred_multi_low = y_pred[:, np.newaxis] y_pred_multi_up = y_pred[:, np.newaxis] if ensemble: y_pred = aggregate_all(self.agg_function, y_pred_multi) + if self.method == "enbpi": + y_pred_multi_low = y_pred[:, np.newaxis] + y_pred_multi_up = y_pred[:, np.newaxis] + if return_multi_pred: return y_pred, y_pred_multi_low, y_pred_multi_up else: From 6a16c09c9f431d4f0dc471427246de83056a3ef6 Mon Sep 17 00:00:00 2001 From: Mohammed Jawhar Date: Mon, 14 Oct 2024 19:46:34 +0200 Subject: [PATCH 2/3] Fix : Corrected EnbPI Prediction Intervals centering --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 8fcded38..0f08fa95 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -42,4 +42,5 @@ Contributors * Ambros Marzetta * Carl McBride Ellis * Baptiste Calot +* Mohammed Jawhar To be continued ... From 0a7777c9d6ef07cccd8d68cbd7287714f9fa07c6 Mon Sep 17 00:00:00 2001 From: Mohammed Jawhar Date: Mon, 14 Oct 2024 19:51:12 +0200 Subject: [PATCH 3/3] Fix : Corrected EnbPI Prediction Intervals centering --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index f57c47de..97c10c20 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,7 @@ History ------------------ * Bump wheel version to avoid known security vulnerabilities +* Fix issue 495 to center correctly the prediction intervals 0.9.1 (2024-09-13) ------------------