Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #495 : Correct EnbPI Prediction Intervals centering #524

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ Contributors
* Ambros Marzetta <ambrosm>
* Carl McBride Ellis <Carl-McBride-Ellis>
* Baptiste Calot <baptiste.calot@capgemini.com>
* Mohammed Jawhar <mohammedjawhar365@gmail.com>
To be continued ...
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------
Expand Down
6 changes: 5 additions & 1 deletion mapie/estimator/regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down