-
Notifications
You must be signed in to change notification settings - Fork 112
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
Allow MapieRegressor
to use the optimal estimation strategy for the bounds of the prediction intervals
#387
Allow MapieRegressor
to use the optimal estimation strategy for the bounds of the prediction intervals
#387
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #387 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 39 39
Lines 4616 4616
Branches 487 758 +271
==========================================
Hits 4616 4616 ☔ View full report in Codecov by Sentry. |
Note: after this PR, we should open an issue to remove |
Co-authored-by: Vincent Blot <[email protected]>
This PR proposes solution for issue #389. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good PR as we allow MAPIE users to explore different capabilities. I think it would be good to also add an issue so that we create a notebook or example to show the usage of beta_optimizer
. This would be so that we show how this influences the interval bounds (and also for our own knowledge).
if method == "plus": | ||
alpha_low = alpha_np if self.sym else alpha_np / 2 | ||
alpha_up = 1 - alpha_np if self.sym else 1 - alpha_np / 2 | ||
alpha_low = alpha_np if self.sym else beta_np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it a little weird to call the bound beta_np
. It really associates it with the beta optimizer. Could we not simply call it the bound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a possibility. Up until now, we've always done it that way. This could be the subject of an issue if the internal naming system poses problems in the long term.
Description
In the MAPIE code, only the
predict
method ofMapieTimeSeriesRegressor
class can useoptimize_beta
to optimize the bounds of the prediction interval.Propose the integration of the same feature into the MapieRegressor class (deleguate this feature in
ConformityScore
class). Merge the twopredict
methods to create a single method for easier maintenance.Fixes #384
Fixes #389
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
optimize_beta
inMapieTimeSeriesRegressor
Checklist
make lint
make type-check
make tests
make coverage
make doc