Empirical Bayes#
To wrap up our discussion on GPs, we talk about model selection. Recall that we must pick a kernel for our Gaussian Process, for instance the Squared Exponential:
Given that our choice of kernel is fixed, the model selection problem becomes one of determining suitable values for hyperparameters \(\sigma_f\), \(\ell\) and the noise \(\beta\).
In Learning and Model Selection, we did the same for weight-space models by marginalizing \(\bw\) to obtain an expression for \(p(\mbf{t})\), the marginal likelihood, or evidence function. We then used Empirical Bayes to compute \(\alpha\) and \(\beta\) that maximized this evidence.
For GPs the operation is exactly the same, but getting to the evidence is much easier now. Recall from Eq. (79) that we already have an expression for \(p(\mbf{t})\):
Since this is nothing more than a multivariate Gaussian, we can easily compute the log likelihood of our training dataset:
where \(N\) is the size of our dataset and the dependencies on \(\sigma_f\) and \(\ell\) come from \(\mbf{K}\). We can then use an optimizer to maximize this expression.
Click through the tabs below to observe the optimization progress of the regression example with \(N=5\) data points we have shown before. The figure captions show the hyperparameter and log marginal likelihood values as more optimizer iterations are run. Note how the likelihood gradually increases, starting from a severely underfit model, passsing through a somewhat overfit model and ending at a well-balanced model. Crucially, we do this without having to define a validation dataset, and therefore using all of our data to make predictions.