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

Adding prediction intervals for GradientBoostingRegressor and review RandomForest prediction intervals - https://alice.its.cern.ch/jira/browse/ATO-459 #67

Open
miranov25 opened this issue Aug 27, 2020 · 4 comments

Comments

@miranov25
Copy link
Owner

miranov25 commented Aug 27, 2020

GradientBoostingRegressor wrapper should be added to the list of wrappers i RootInteractive:

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html
https://medium.com/@qucit/a-simple-technique-to-estimate-prediction-intervals-for-any-regression-model-2dd73f630bcb

To be integrated in similar way also QuantileRegressionForest -clone
https://scikit-garden.github.io/examples/QuantileRegressionForests/
https://jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf

Finally, quantile regression is not available for all types of regression models. In scikit-learn, the only 
model that implements it is the Gradient Boosted Regressor. Sometimes, such as in the case of XGBoost, 
you can customize the model’s cost-function to  obtain quantile regressor. You can read the details of how to do it here.
@miranov25
Copy link
Owner Author

In order to include new regression, classifiers - MLpipeline code to be restructured
https://alice.its.cern.ch/jira/browse/ATO-459

Current version (TO BE deprecated)

  • design influenced by TMVA - does not scale
  • fitter, regressor created in fit function based on the names and options
    • method parameter defined in Register_Method
    • model created during the fit method
    • many if, does not scale

New version - to be implemented

  • models (regression, quantile regression wrappers) to be constructed by users
  • wrappers implement additional common functionality
  • models registered in Register_model
  • models reused for fits

@miranov25
Copy link
Owner Author

miranov25 commented Sep 6, 2020

Reference - GradientBoostingRegressor https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html

quantiles obtained during training time - using appropriate cost function

loss{‘ls’, ‘lad’, ‘huber’, ‘quantile’}, default=’ls’

loss function to be optimized. ‘ls’ refers to least squares regression. ‘lad’ (least absolute deviation) is a highly robust loss
function solely based on order information of the input variables. ‘huber’ is a combination of the two. ‘quantile’ allows quantile > regression (use alpha to specify the quantile).

Other References

https://towardsdatascience.com/regression-prediction-intervals-with-xgboost-428e0a018b
https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0
https://www.evergreeninnovations.co/blog-quantile-loss-function-for-machine-learning/

@miranov25 miranov25 changed the title Adding prediction intervals for GradientBoostingRegressor and review RandomForest prediction intervals Adding prediction intervals for GradientBoostingRegressor and review RandomForest prediction intervals - https://alice.its.cern.ch/jira/browse/ATO-459 Sep 6, 2020
@miranov25
Copy link
Owner Author

miranov25 commented Sep 6, 2020

Quantile regression interface:

In general - quantiles should be defined before fitting (not needed in the Scikit -garden - but skgradern not supported anymore)

BDTs and neural nets should be constructed knowing which quantiles are needed

  • BDTs
    • For BDT array of the regressor to be created for each quantile
  • Deep neural nets options
    • Array of neural nets create for each quantile:
      • Slower - 
      • Non consistent - quantiles prediction could be not sorted
      • Bigger variance
    • One neural net for all quantile predictions

Proposed interface:

  • init
  • fit
  • predict(+index)
  • appendStatPandas(options)
    • append statistics to the panda data frame
    • by default all options
  • RMS estimators based on the quantiles
    • some approximation has to be done
      appendStatTree ?
    • append statistic to the tree for later usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant