Gaussian Processes Explained
Introduction to Gaussian Processes
A Distribution Over Functions
Imagine you have a few data points plotted on a graph, and you want to draw a line that fits them. You could draw a straight line, a curvy line, or a very wiggly line. There are infinitely many functions that could pass through your points. A Gaussian Process (GP) is a clever way to think about all these possibilities at once.
Instead of defining a single function, a Gaussian Process defines a distribution over functions. It provides a probabilistic way to model an unknown function. Think of it as a cloud of potential functions, where some are more likely than others based on the data we've observed.
Gaussian Process
noun
A collection of random variables, any finite number of which have a joint Gaussian distribution.
What does that definition actually mean? It means if you pick any set of points on your x-axis, the corresponding y-values of the function are assumed to follow a familiar bell curve-like distribution, a multivariate Gaussian distribution. This assumption allows us to make predictions about the function's value at points we haven't measured yet, and—crucially—to quantify our uncertainty about those predictions.
Properties of a Gaussian Process
A Gaussian Process is completely defined by two things: a mean function and a covariance function.
The mean function, , represents our prior belief about the function's shape before seeing any data. It's the average of all functions in the distribution. Often, for simplicity, we start by assuming the mean function is zero everywhere.
The covariance function, , also known as the kernel, is the heart of the GP. It defines the relationship between the function's values at two different points, and . It essentially controls the smoothness and general shape of the functions in our distribution.
A common choice for a covariance function says that if two points are close to each other, their function values should be strongly correlated. If they are far apart, their correlation is weak. This is intuitive; the temperature today is a good predictor of the temperature tomorrow, but not for the temperature six months from now.
How GPs Compare
It's helpful to place Gaussian Processes in context. They are a type of stochastic process, but with a specific, powerful assumption.
| Type | What it Describes | Example |
|---|---|---|
| Gaussian Distribution | A single random number | The height of a person |
| Multivariate Gaussian | A fixed set of random numbers | The height, weight, and age of a person |
| Gaussian Process | An infinite set of random numbers (a function) | The temperature over a continuous period of time |
Other stochastic processes, like Markov chains, model sequences of events where the next state only depends on the current state. A GP is different because it's typically used for continuous inputs, and the relationship between any two points is defined by the covariance function, not just by the nearest neighbors.
This Gaussian assumption makes the math elegant and allows for exact inference. In other words, we can calculate the mean and variance of our prediction at a new point precisely.
Applications in Machine Learning
Because they excel at quantifying uncertainty, Gaussian Processes are used in many areas of machine learning.
The most common application is in regression, where we want to fit a model to data. A GP can provide not just a prediction but also a confidence interval for that prediction. This is extremely valuable in fields like robotics, finance, and scientific modeling, where knowing how confident your model is can be as important as the prediction itself.
They are also used for classification, where the goal is to assign a label to an input, and in optimization, particularly in situations where evaluating the function we want to optimize is very expensive.
By modeling functions probabilistically, GPs give us a flexible and powerful tool for understanding data and making principled predictions under uncertainty.
What is the most accurate way to describe a Gaussian Process (GP)?
A Gaussian Process is completely specified by which two components?
