# Gaussian Processes: from random vectors to random functions

In the previous video we have introduced Gaussian Processes and used them to model shape deformations. Gaussian Processes generalise the concept of multivariate normal distributions. Whereas the multivariate normal distribution models random vectors, Gaussian Processes allow us to define distributions over functions and deformation fields. In the case of discrete functions, a Gaussian Process is simply a different interpretation of a multivariate normal distribution. The goal of this article is to discuss this point in more detail and to provide the intuition for the general case.

## Representing discrete scalar-valued functions using a multivariate normal distribution

Let be an arbitrary continuous domain and let be a discretisation of that domain. We consider a discrete function

which is defined on that domain. The discrete function can be represented by a vector

Vice versa, the vector completely defines the function as we can define . Figure 1 illustrates this situation.

^{Figure 1: a discrete function can be represented by a vector and vice versa.}

Recall that our goal is to model distributions over functions. We can model using a multivariate normal distribution i.e. . This in turn defines a distribution over the discrete functions . For example, we can draw a random function, by drawing a sample from this normal distribution, and use it to define the corresponding discrete function .

## Representing discrete vector-valued functions using a multivariate normal distribution

In shape modelling, we are interested in modelling vector fields and not scalar-valued functions. Fortunately, this is not much more complicated. Let

be a discretely defined vector field. The difference to the previous case is that each component is now a vector, i.e. As before, we can identify the vector field with a vector

Modelling using a multivariate normal distribution results, as before, in a distribution over the (discrete) vector field .

## From vectors to function

Gaussian Processes make it possible to model a distribution over functions without choosing a discretisation up front. The intuition is the following: to model a 2D vector field, we define a Gaussian Process with mean function and covariance function . These functions define the mean deformation for all the points and the covariance between the deformations for any pair of points and . This allows us to define normal models for functions that are defined using an arbitrarily fine discretisation. Since, in practical applications (i.e. for computer implementations), we always work with a discretisation, this is already an almost perfect situation. It allows us to choose for any application the discretisation that yields the desired accuracy.

From a mathematical point of view even more can be done. A Gaussian Process model still defines a valid distribution over functions even if we consider all the points of the continuous domain . The mathematical details are quite technical, which makes Gaussian Processes appear complicated. But the intuition that we build up for the finite domains is exactly right and we do not have to take these mathematical subtleties into account in this course.

© University of Basel