An interactive mathematics tool
Gaussian Process Explorer
Click directly on the graph to add an observation. Watch the possible functions, their mean, and their uncertainty respond on the very same plot.
Calculations run in this browser. Your points stay in this page’s memory and clear when you reload.
Loading the explorer…
Prior
0 / 40 observationsClick or tap inside the axes to add a point; click an existing point to remove it. The axes automatically fit all displayed functions.
- Samples from the prior
- Mean of f
- Relative density of f
- 95% pointwise interval for f
- Observations
Reset clears all observations and restores the default model parameters.
Green shading shows the Gaussian density relative to its peak at each x: darker near the mean, lighter in the tails. Thin dashed lines mark mean ± 1.96 standard deviations for the latent function f (the 95% pointwise interval). This excludes future observation noise and is not a simultaneous band for the entire function.
Observation data & removal controls
| Point | x | y | Action |
|---|
Numerical posterior values
| x | Mean | Lower | Upper |
|---|
The model behind the picture
This is a zero-mean Gaussian process with a squared-exponential (RBF) kernel:
k(x, x′) = σf² exp(−(x − x′)² / (2ℓ²))
Here ℓ is the length scale and σf is the signal standard deviation. Observations follow y = f(x) + ε, with independent Gaussian noise of standard deviation σn. The training covariance adds σn² to its diagonal. Parameters are chosen by you rather than fitted automatically.
The thin curves are joint samples of the latent function, initially from the prior and then from the posterior as you add observations. The underlying random draws stay fixed while you add points, so you can see conditioning change the functions. “Draw new functions” generates a fresh set without changing your data. With positive observation noise, posterior functions need not pass exactly through the observations.
Repeated inputs at zero noise may need a small numerical regularization, which is reported below the plot. For conflicting observations at the same x, a positive noise level is a more appropriate model.
The browser version is self-contained and accepts points directly. The original Python application source remains available separately.