Skip to content
CoreSource checked

Gaussian Process Regression

Predicts a continuous target with a Gaussian process posterior over functions.

Quick Facts

Compact metadata for implementation and discovery.

Category
Machine Learning
Difficulty
Intermediate
Family
Probabilistic Models
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Gaussian Process Regression places a kernel-defined prior over functions and conditions that prior on observed data to obtain predictive means and uncertainties.

Core Concepts

bayesian regressionprobabilistic modelsmachine learning

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n^2)

Average

O(n^3)

Worst

O(n^3)

Space

O(n^2)

When to Use

  • Use it when uncertainty estimates are important and the dataset is small enough for kernel methods.
  • Use it when a meaningful covariance kernel can encode smoothness or similarity assumptions.
  • Use sparse or approximate variants for larger datasets.

When Not to Use

  • Avoid exact GPR on large datasets where cubic training cost is impractical.
  • Avoid it when kernel assumptions are not meaningful for the data.
  • Avoid trusting uncertainty estimates without checking noise and kernel choices.

What It Does

  • Models functions probabilistically
  • Returns both predictions and uncertainty estimates

Use Cases

  • Small-data regression
  • Bayesian optimization surrogates
  • Uncertainty-aware interpolation

Inputs

  • Training inputs X, targets y, and covariance kernel k(x, x')
  • Query points X_* and noise hyperparameter σ_n^2

Outputs

  • Posterior predictive mean μ_* and variance/class probabilities Σ_*
  • Cholesky factor of the regularized kernel matrix

Key Formulas (1)

Posterior mean

mu_· = K_·T (K + σ2 I)−1 y
mu_* = K_*^T (K + sigma^2 I)^-1 y

Predicts the mean at new points from the kernel matrix and observations.

Pseudocode

  1. 1.Initialize the input structures and parameters for Gaussian Process Regression (bayesian regression).
  2. 2.Set up the working state for probabilistic models (probabilistic models).
  3. 3.Execute the core step by Predicts a continuous target with a Gaussian process posterior over functions (mu_* = K_*^T (K + sigma^2 I)^-1 y).
  4. 4.Update invariants and check termination or convergence criteria.
  5. 5.Return the resulting probabilistic models output.

Canonical Example

Input
observations: (0,0), (1,1); query x = 0.5
Output
predictive mean and variance at x = 0.5
Explanation
The posterior combines the kernel prior with observed values to estimate both value and uncertainty.

Implementation Notes

  • Add jitter or noise variance before Cholesky factorization.
  • Scale inputs before fitting kernel hyperparameters.
  • Separate predictive mean and variance calculations.

Common Pitfalls

  • Choosing a kernel that encodes the wrong smoothness or periodicity.
  • Ignoring numerical conditioning in the covariance matrix.
  • Treating posterior uncertainty as calibrated without validation.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show conditioning a Gaussian process prior on observed data on a small bayesian regression example.

Gaussian Process Regression mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Initialize the input structures and parameters for Gaussian Process Regression (bayesian regression).
machine-learning-mechanism

Notes

Gaussian Process Regression operates in O(n^3) time and O(n^2) space within the Probabilistic Models family. Key governing relation: mu_* = K_*^T (K + sigma^2 I)^-1 y. Often compared with Gaussian Process Classification and Word2Vec Skip-Gram.

Sources (1)

What each reference supports for this entry.

Gaussian Processes for Machine Learning

Book

Reference for Gaussian process regression, kernels, posterior mean, and posterior covariance.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Gaussian process classification adapts the Gaussian-process prior to discrete labels through a likelihood model.

Alternative toLinear Regression

Linear regression gives a parametric baseline, while GPR uses a nonparametric kernel prior.

Tags

Machine Learning