stanfordmlgroup / ngboost

Natural Gradient Boosting for Probabilistic Prediction
Apache License 2.0
1.64k stars 215 forks source link

Probabilistic quantile (P25) forecast - How to ? #195

Closed nsankar closed 3 years ago

nsankar commented 3 years ago

Hi,

From an estimated forecast distribution (using ngboost regression), how can I get only the p25 (25th percentile) forecast? Can you guide with a code snippet and any other considerations to make . Thank you in advance.

avati commented 3 years ago

You could do something like this:

dists = ngb.pred_dist(X_test)
p25 = dists.ppf(0.25)
nsankar commented 3 years ago

thanks @avati