Write some code to sample from a GP prior. In particular, define some onedimensional input points (

Question:

Write some code to sample from a GP prior. In particular, define some onedimensional input points ( \(x\) ), compute the covariance matrix by computing the covariance function at all pairs of points in \(x\) and then sample from the multivariate Gaussian with zero mean and covariance equal to the covariance matrix. Vary the covariance function and its associated parameters. Note that occasionally you may find that you cannot sample, as your covariance matrix is singular. When this happens, add a small constant to the diagonal elements of the matrix.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

A First Course In Machine Learning

ISBN: 9781498738484

2nd Edition

Authors: Simon Rogers , Mark Girolam

Question Posted: