PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 85 in Math Visualization.

View category →
NewUniversity / research

Kalman Filter 2D Tracking

Launch Simulator

4-state constant-velocity tracker: noisy (x,y) measurements, process acceleration noise Q, measurement variance R, and a live ≈2σ covariance ellipse.

NewUniversity / research

Kalman Filter (1-D)

Launch Simulator

Recursive optimal estimation: noisy measurements, hidden truth, predict + update with Q and R; random-walk or constant-velocity model with ±2σ band and innovations.

NewUniversity / research

Monte Carlo Integration & Variance Reduction

Launch Simulator

Compare plain Monte Carlo, importance sampling, and stratified sampling for ∫f(x)dx, with convergence curves, standard error, and the 1/√N rate.

NewUniversity / research

Support Vector Machine Margin

Launch Simulator

Hard/soft-margin SVM sketch with C penalty, hinge loss, support vectors, decision boundary, and margin bands.

NewUniversity / research

LMS / NLMS Adaptive Noise Cancellation

Launch Simulator

Primary p = s + v with v a fixed unknown FIR of Gaussian reference x[n]. Watch an L-tap FIR adapt by LMS or NLMS so error e = p − wᵀx → s; running MSE and ‖w − h‖.

NewUniversity / research

PCA / SVD Geometry

Launch Simulator

Covariance ellipse and SVD view of dimensionality reduction: principal components, explained variance, and rank-1 reconstruction error.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Gaussian Process Regression

Gaussian Process Regression

Interactive GP regression with RBF and Matérn kernels: tune length scale/noise, add observations by clicking, view posterior mean with uncertainty bands, and sample at max posterior variance.

Gaussian process

0.16
1
0.08

GP posterior uses K(X,X)+σ_n²I and Cholesky solves. Active sampling greedily adds the point with largest latent posterior variance, not necessarily largest error.

Shortcuts

  • •Click graph — add sample
  • •Active button — add max-uncertainty sample

Measured values

samples4
next x (max σ)0.453
avg posterior σ0.313
log marginal likelihood-3.98

About this model

Gaussian process regression treats an unknown function as a random function whose values have a joint Gaussian distribution determined by a kernel. In this simulator the hidden target is sampled through user-added observations, then the posterior is recomputed from K(X,X)+σ_n²I using a Cholesky solve. The blue curve is the posterior mean μ(x), the translucent band is roughly a 95% latent uncertainty interval μ(x)±2σ(x), and the yellow dots are observed data. Choose an RBF kernel for very smooth functions or Matérn 3/2 / 5/2 kernels for rougher priors, then tune the length scale, signal variance, and observation noise to see how the posterior changes. The active-sampling button greedily adds the point with largest posterior standard deviation, illustrating exploration based on uncertainty rather than current prediction error.

Who it's for: Students in statistics, machine learning, numerical modelling, or Bayesian inference who want geometric intuition for kernels, posterior uncertainty, and active learning.

Key terms

  • Gaussian process
  • Kernel
  • RBF kernel
  • Matérn kernel
  • Posterior mean
  • Uncertainty band
  • Cholesky factorization
  • Active sampling

How it works

Interactive Gaussian process regression with RBF and Matérn kernels: click to add observations, tune length scale/noise, inspect posterior mean and uncertainty, and use max-variance active sampling.

Key equations

K_y = K(X,X)+σ_n²I, posterior μ(x*) = k_*ᵀK_y⁻¹y, σ²(x*) = k(x*,x*) − k_*ᵀK_y⁻¹k_*. Active rule: argmax σ(x).

Frequently asked questions

What does the kernel control?
The kernel defines how strongly function values at two input locations are correlated. A short length scale lets the posterior wiggle between nearby samples, while a long length scale enforces broad smooth trends. Matérn kernels are less smooth than the RBF kernel, so they tolerate sharper changes.
Why does uncertainty shrink near observations?
Conditioning a joint Gaussian on observed values reduces posterior variance most strongly near those input locations. Observation noise prevents the uncertainty from collapsing completely and makes the mean less eager to pass exactly through every point.
Is max-variance active sampling always optimal?
No. It is a simple exploration strategy: sample where the model is most uncertain. Practical Bayesian optimization or experimental design often combines uncertainty with expected improvement, cost, constraints, or a task-specific objective.