Prediction Intervals Using XGBoost I want to obtain the prediction intervals of my xgboost model which I am using to solve a regression problem. I am using the python code shared on this blog, and not really understanding how the quantile parameters affect the model (I am using the suggested parameter values on the blog). 
When I apply this code to my data, I obtain nonsense results, such as negative predictions for my target values while my target values are always over 10K. 
I don't understand how should this code vary according to my data and would really appreciate any help.

Differences in my data to the data that is used on the blog are:


My distribution is Poisson like. 
I have over 100 features.


Note: I tried tuning the delta, threshold and var parameters, but they don't seem to have a controllable effect on the results and predictions remains nonsense.
To produce confidence intervals for xgboost model you should train several models (you can use bagging for this). Each model will produce a response for test sample - all responses will form a distribution from which you can easily compute confidence intervals using basic statistics. You should produce response distribution for each test sample.

this answer is provided here:
https://stackoverflow.com/questions/37418938/how-to-obtain-a-confidence-interval-or-a-measure-of-prediction-dispersion-when-u