(gaussian_process)=

Gaussian Processes using numpy kernel

:::{post} Jul 31, 2022 :tags: gaussian process, :category: advanced :author: Chris Fonnesbeck, Ana Rita Santos and Sandra Meneses :::

Example of simple Gaussian Process fit, adapted from Stan's example-models repository.

For illustrative and divulgative purposes, this example builds a Gaussian process from scratch. However, PyMC includes a {mod}module dedicated to Gaussian Processes <pymc.gp> which is recommended instead of coding everything from scratch.

We will use a squared exponential covariance function, which relies on the squared distances between observed points in the data.

This is what our initial covariance matrix looks like. Intuitively, every data point's Y-value correlates with points according to their squared distances.

The following generates predictions from the Gaussian Process model in a grid of values:

Sample from the posterior Gaussian Process

Authors

Watermark

:::{include} ../page_footer.md :::