MAPIE icon indicating copy to clipboard operation
MAPIE copied to clipboard

**fit_params and **predict_params

Open cerlymarco opened this issue 2 years ago • 5 comments

Why not allow the usage of fit_params and predict_params of the estimator in .fit(...) and .predict(...)? Is there a special reason behind this choice?

The implementation of this should be straightforward!

cerlymarco avatar Jul 24 '22 16:07 cerlymarco

Hey @cerlymarco, thank you! Indeed, this could be added. Could you give us a use case for this issue? Additionally, note that in the .fit() of MapieRegressor does both fitting and predicting (as it predicts on the calibration set in the .fit() method).

LacombeLouis avatar Aug 02 '22 10:08 LacombeLouis

Hi @LacombeLouis, thanks for the response.

The most effective and simple application may be using LGBMRegressor/LGBMClassifier or XGBRegressor/Classifier.

Both of them allow the usage of lot parameters in fit and predict...

Not only... all the tools which provide custom sckiti-learn estimators should benefit from this.

In MapieRegressor(...).fit() predicting should not involve the usage of predict_params but only fit_params. This is a reasonable simplification which is also adopted in cross_val_predict from sklearn

cerlymarco avatar Aug 02 '22 10:08 cerlymarco

Hi @cerlymarco, thank you for the suggestion. Indeed, this makes a lot of sense. For the moment, we are quite busy with other projects or more documentation of methods. If you have time and would like to contribute, we would be delighted to guide you through this process (note that you can start by following the guidelines).

LacombeLouis avatar Aug 23 '22 14:08 LacombeLouis

Hello @LacombeLouis @thibaultcordier @cerlymarco, I have opened the PR #391 for adding the possibility of passing fit parameters. Feel free to give any feedback!

sami-ka avatar Dec 29 '23 10:12 sami-ka