-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Multi-parameter optimization with custom loss function for probabilistic forecasting #5859
Comments
Thanks for reaching out. Your work has already generated a lots of interest on our side. ;-) I have a proof of concept implementation for multi-target training in #5460 . Lastest commit on that branch broke some functionalities so it can't be used yet. Just out of personal interest, I also looked into ngboost, in
And also from some experiments based on #5460, I agree with it. It might be due to the gradient, or might be due to model capacity, I'm not sure yet. |
Just in case I misunderstood something. If you are looking for 1 parameter per tree solution, then existing code base has already supported it. See /demo/guide-python/custom_softmax.py for an example on Python. |
@trivialfis Thank you so much for you comments and suggestions, very much appreciated! Let me go through the material you've provided. I`ll keep you updated on the progress. |
Hi all, I found this article that I think it may be helpful to this enhancement request for xgboost: https://towardsdatascience.com/regression-prediction-intervals-with-xgboost-428e0a018b Ivan |
Thanks for the reference, I will look into it. |
Hi all, I found NGBoost approach (https://github.com/stanfordmlgroup/ngboost) to conduct probability regression. It seems that their code allows to use any based tree learner to perform a regression analysis. I have Python 3.6.5 with XGBoost 1.1.0 and NGBoost 0.3.10 and I gave try with the following code if name == 'main': x, y= load_boston(return_X_y= True) learner= xgb.XGBRegressor(max_depth= 6, n_estimators= 300, verbosity= 1, objective= 'reg:squarederror', ngb= ngboost.NGBRegressor(Dist= ngboost.distns.Normal, Score= ngboost.scores.CRPScore, Base= learner, ngb.fit(x_train, y_train, X_val= x_validation, Y_val= y_validation) fig, ax= plt.subplots(nrows= 1, ncols= 1) I got the following warning message: It seems that this error played a role because according the generated plot the boosting stage didn't work well. It is like the same tree was repurposed through out the entire process. If someone could look into how to get these two packages to work together, then I believe we have the pathway to run probabilistic regression using XGBoost. Many thanks, Ivan |
Hi all, Previously, I reported that the boosting stage didn't work well. It is like the same tree was repurposed through out the entire process. I believe that I found a way to overcome such issue. I needed to set a number of estimators for xgboost as well for ngboost. The code below shows this modification: import numpy as np if name == 'main':
Unfortunately, I still get the same warning message: Does this issue influence the quality of the learned model by xgboost? Kind regards, Ivan |
Dear community,
I am currently working in a probabilistic extension of XGBoost called XGBoostLSS that models all parameters of a distribution. This allows to create probabilistic forecasts from which prediction intervals and quantiles of interest can be derived.
The problem is that XGBoost doesn`t permit do optimize over several parameters. Assume we have a Normal distribution y ~ N(µ, sigma). So far, my approach is a two-step procedure, where I first optimize µ with sigma fixed, and then optimize sigma with µ fixed and then iterate between these two.
Since this is inefficient, are there any ways of simultaneously optimize both µ and sigma using a custom loss function?
The text was updated successfully, but these errors were encountered: