While doing regression using Gaussian Processes, isn't the variance of the posterior supposed to be low where training data has already been observed?


Yes, that is the idea. We are confident when we see data and less confident where we have not seen data. However if you are not finding this, here are some potential reasons:

Poor Model: If you use a kernel (perhaps periodic) you may find that the variance is small where no data is present. This is because the kernel thinks that the data is 'close' to data it has already seen.

Poor (Hyper-)Parameters: If you have not optimised over (hyper-)parameters, or your optimisation has fallen into a local minima, you may find that the variance of points close to data is large. For example if the length scale of a RBF kernel is tiny, or you are adding iid noise to your observed data ($K^+=K + \sigma I$) and the noise is very large.

Numerical Errors: Attempting to perform $K^{-1}$ without cholesky sometimes give really weird results on poorly conditioned data.

Silly Mistakes: This often happens when you code up your first few GPs. You scale your x-axis and forget to recompensate or something of this nature. This can be hard to spot initially but you do become more confident after debugging and finding your own mistakes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.