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

More from Math Visualization

Other simulators in this category — or see all 72.

View category →
NewUniversity / research

Rössler Attractor

RK4 integration of ẋ=−y−z, ẏ=x+ay, ż=b+z(x−c); period-doubling cascade as c grows.

Launch Simulator
NewSchool

L-Systems (Turtle)

Lindenmayer string rewriting + turtle: Koch, Sierpinski, Hilbert, Heighway dragon, plant.

Launch Simulator
NewSchool

Bézier & de Casteljau

Drag control points; live recursive linear-interpolation scaffolding evaluates B(t).

Launch Simulator
NewSchool

Convex Hull (Graham & QuickHull)

Click to add points, drag to move; Graham scan with step playback or QuickHull divide-by-farthest; compare vertex sets.

Launch Simulator
NewSchool

Delaunay & Voronoi

Bowyer–Watson triangulation and dual Voronoi tessellation; click to add seeds, drag to move.

Launch Simulator
NewUniversity / research

Physarum Slime (Agents)

~4500 agents follow a deposited chemoattractant: deposit + diffusion + decay + 3-sensor steering grow path networks.

Launch Simulator
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

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

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

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.