Python stats module: How to extract confidence/prediction intervals from GPy?

Given a model, and a set of target x values we want to generate the intervals at, you can extract the intervals using:

intervals = model.predict_quantiles( X = target_x_vals, quantiles = (2.5, 97.5) )

You can change the quantiles argument to get the appropriate width ones. The documentation for this function is found at: https://gpy.readthedocs.io/en/deploy/_modules/GPy/core/gp.html