Question: Write some code to sample from a GP prior. In particular, define some onedimensional input points ( (x) ), compute the covariance matrix by computing

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.

Step by Step Solution

3.34 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The fo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Machine Learning Questions!