GP: Credible Interval from mean & covariance matrix

How can I get the credible interval from the output of a Gaussian Process? All I have is the mean and covariance.

When looking at the example for GP in numpyro, I see this line:
sigma_noise = jnp.sqrt(jnp.clip(jnp.diag(K), a_min=0.0)) * jax.random.normal(rng_key, X_test.shape[:1])

It looks like it would be possible to make samples by taking the square root of the diagonal in the covariance matrix. And then add random gaussian noise a bunch of times.

One idea I had was to just take 2000 samples from torch.distributions.normal.Normal(model_mean, model_std)

In GP, we assume the output follows the (mv)normal distribution over the input. So I think we can use credible interval of Normal distribution here. E.g. in Pyro GP tutorial, we plot ±2 * std (i.e. 95% CI right?)

1 Like