Interactive demo · Bayesian and Probabilistic Machine Learning · Chapter 6

Gaussian process regression: kernels, hyperparameters, ARD

A Gaussian process is a prior over functions defined by a kernel: any finite set of function values is jointly Gaussian. Draw functions from the prior (Figure 6.4), condition on noisy data to get a predictive mean and an uncertainty band that grows away from the data (Figure 6.8), see how the length scale and the noise level change the fit (Figure 6.5), let the marginal likelihood choose the hyperparameters, and watch automatic relevance determination switch off an irrelevant input (Figures 6.9 and 6.10).

Try these

Data: sin(2πx) plus noise of sd 0.3 at equally spaced inputs on [0, 1] (the first N of ten, as in Figure 6.8 where the right-most three are left out), generated with a seeded generator. Inputs on [0, 1] are half the width of the book’s [−1, 1], so a given θ1 here corresponds to θ1/4 there. ARD data: x1 ~ N(0, 0.352), x2 = x1 + noise, x3 independent, N = 100. Optimiser: Newton (one input scale and noise) or L-BFGS (ARD).

In the lecture notes