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

Add CatBoostRegressor to MapieQuantileRegressor class #217

Open
fjpa121197 opened this issue Aug 19, 2022 · 2 comments
Open

Add CatBoostRegressor to MapieQuantileRegressor class #217

fjpa121197 opened this issue Aug 19, 2022 · 2 comments
Assignees
Labels
Enhancement Type: enhancement (new feature or request) Good first issue Easy issue to start to contribute to MAPIE Needs decision The MAPIE team is deciding what to do next. Regression Related to regression (excluding time series) Source: contributors Proposed by contributors.
Milestone

Comments

@fjpa121197
Copy link

Is your feature request related to a problem? Please describe.
Currently, I'm using CatBoost regressor for a regression problem, where this model seems to give best performance. Right now, I'm looking to produce prediction intervals, and would like to stick with the same model, and at the same time, make use of MAPIE and not make separate models in code.

Describe the solution you'd like
Use CatBoost regressor with CQR.

Describe alternatives you've considered
Solution is not using MAPIE and create 2 additional models and follow same approach to calculate q, and then form the sets. Other is to modify code base and add CatBoost regressor support, but not really good at coding, still understanding quantile_regression.py file, to see how to add CatBoost, since I think, the only way to use quantile loss function and alpha, is by setting them both values in the same string like this:
model = catboost.CatBoostRegressor(loss_function='Quantile:alpha=0.95', ...)

*I can maybe take a look at it and work on it, but will take time. It would be a good first contribution to do for me :)

Thanks in advance,

@fjpa121197 fjpa121197 added the Enhancement Type: enhancement (new feature or request) label Aug 19, 2022
@vtaquet
Copy link
Member

vtaquet commented Aug 22, 2022

Hi @fjpa121197 ! Indeed, MapieQuantileRegressor does not accept CatBoostRegressor at the moment. A workaround is to modify the quantile_estimator_params attribute to include this class as a new key. The problem is that both the "quantile" objective and the "alpha" value are defined in the same loss_function argument, which is not taken into account in MAPIE at the moment. @LacombeLouis , do you think it can be easily added ?

@LacombeLouis
Copy link
Collaborator

Hey @vtaquet and @fjpa121197, we are currently creating a cv="prefit" method where you will be able to pre-train your models and then use those directly with MapieQuantileRegressor() (PR#214). For the moment, having a built-in solution will not be our main focus, but if you want to contribute, I suggest you follow the guidelines for contributing and we will be delighted to help you with this process.

@LacombeLouis LacombeLouis added the Good first issue Easy issue to start to contribute to MAPIE label Feb 23, 2023
@thibaultcordier thibaultcordier added the Source: contributors Proposed by contributors. label Jul 4, 2023
@LacombeLouis LacombeLouis added this to the 0.9.0 milestone Apr 25, 2024
@jawadhussein462 jawadhussein462 added the Regression Related to regression (excluding time series) label Nov 18, 2024
@jawadhussein462 jawadhussein462 added the Needs decision The MAPIE team is deciding what to do next. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Type: enhancement (new feature or request) Good first issue Easy issue to start to contribute to MAPIE Needs decision The MAPIE team is deciding what to do next. Regression Related to regression (excluding time series) Source: contributors Proposed by contributors.
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

6 participants