Demos
Exact physical analogies only.
Every demo is an exact physical analog, not an illustration: the idealised mechanism's potential energy equals the negative log posterior term for term, so its equilibrium is the estimator. Each page draws the closed-form answer dashed alongside the simulation so you can watch the physics land on it.
- Evidence fusion — a prior and any number of observations hang on a test particle; the particle relaxes to the posterior mean and the total mass is the posterior precision. Add observations one at a time and watch equilibrium re-form; slacken the observation channel with the ρ dial to see the reduced-mass rule at work.
- Reduced mass — a hierarchical chain (observation, latent joint, particle) above its consolidated equivalent: a single body carrying the reduced mass φρ/(φ+ρ). Both settle on the same line; slacken the channel and watch the evidence's weight drain away.
- The filter through time — one body of evolving mass, alternating predict (mass shrinks through a series spring) and update (mass grows by fusion) tick by tick. Play it, or step through by hand; skip observations and watch staleness go unchecked.
- Conditioning a Gaussian graph — six beads on a chain plus a non-local shortcut edge. Pin any node and the rest relax into the exact conditional mean — a Schur complement of the graph's precision matrix, propagating along every path, not just to nearest neighbours.
- Schur damping — eliminating the chain's free joint is a scalar Schur complement; the γ dial keeps only a fraction of the joint's recoil, sliding between clamped-to-the-data overconfidence (γ=0) and the exact marginal (γ=1). The allocation version of the same dial lives at schur.microprediction.org.
- Least squares as springs — a rigid rod tied by vertical springs to draggable data points relaxes to the ordinary least squares line, after Loftus.
- The time-series smoother — a bead chain (measurement springs down to the data, process-noise springs between neighbours) relaxes to the Kalman smoother of a local-level model, alias Whittaker–Henderson graduation. Add an observation and watch the whole posterior path re-equilibrate.
- Bid-ask bounce — a Gaussian Roll model: trades with negatively autocorrelated errors are anti-redundant evidence. The GLS weights are precision row sums, so bouncing prices carry more mass than their naive iid weight — and stale, positively correlated ones far less.
- The minimum-variance portfolio — a bead on the allocation rail, tied to the corner portfolios by springs of stiffness σ²−c. Raise the correlation and a spring turns repulsive: short selling emerges mechanically. Min-var weights are precision row sums — the GLS estimator of a common mean in a finance hat.
- PCA as a rod on sliding collars — attach the regression rod's springs through frictionless collars and they pull perpendicular: the rod relaxes to the first principal component, and balances unstably on the second. Pearson's 1901 “line of closest fit,” literally.
- Ridge vs Lasso — where the Hookean analogy breaks, on purpose. Ridge is an ordinary spring to zero; Lasso swaps it for a constant-tension pulley, and once the data spring's pull weakens below the tension the bead sticks at exactly zero — soft-thresholding, mechanically.
Have an idea for a demo? Open an issue on the repo.