-
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
Add fit parameters passing #391
Add fit parameters passing #391
Conversation
…nsembleRegressor class
…of the MapieClassifier class
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #391 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 39 39
Lines 4616 4815 +199
Branches 487 800 +313
==========================================
+ Hits 4616 4815 +199 ☔ View full report in Codecov by Sentry. |
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.
Hi @sami-ka,
This is great! Thank you for contributing to MAPIE.
I see that you've added for all the instances for **fit_params
.
One small issue is that you've currently only implemented one test. I suggest adding tests for classification and regression.
Thank you!
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.
Thank you very much for this proposal, which will extend the use of MAPIE to more estimators! Here is my feedback to complete this PR:
- add unit tests for calibration, classification and regression (as you did for quantile regression). No need for time series.
- some writing style suggestion.
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.
All right, then! We're about to wrap up this PR. I'd like to suggest a few changes to help us maintain your code in the future.
I see that we've instantiated the gb
object at the start of the test_quantile_regression.py
file, but I think it would be better to do this directly in your tests in the other files (as it won't be used elsewhere except for test_quantile_regression.py
).
You are right, it would definitely be more relevant inside the tests. Thanks for the suggestion! |
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.
Thank you very much @sami-ka for your qualitative contribution to MAPIE. As far as I'm concerned, everything's fine, even if I added a comment (thanks in advance if you can add this point). @vincentblot28 , @LacombeLouis if you want to see before the merge.
Co-authored-by: Thibault Cordier <[email protected]>
@thibaultcordier Is there something else to do? Could this PR be merged? |
@sami-ka I'll let @LacombeLouis confirm that he has no more change requests. He will then merge your PR. |
Description
In the MAPIE code, the fit function does not allow to pass parameters usable at fit time for base estimator. This is the case for early stopping in LightGBM for instance.
Fixes partially #212 (fit_params only)
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
monitor
parameter infit
function ofGradientBoostingRegressor
Checklist
make lint
make type-check
make tests
make coverage
make doc