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
The fo... View full answer
Get step-by-step solutions from verified subject matter experts
