Approximate Inference and MCMC — Copying a Shape by Walking Around, Tracing It with a Simple Shape

See, with pictures and motion, two ways to handle a hard-to-handle shape (a distribution): copying it with footprints, and tracing it with a bell.

This page checks two methods that work without knowing the normalization constant Z = ∫ p̃(x) dx, using a one-dimensional target distribution. In Tab ①, the Laplace approximation and the Gaussians that minimize the KL divergence in its two directions are overlaid, so that you can see which way each approximation is distorted and check numerically that the ELBO is a lower bound on ln Z whose gap is KL(q‖p). In Tab ②, you run Metropolis–Hastings chains and read the proposal width, acceptance rate, autocorrelation, effective sample size, and R̂, and you confirm that for a double well with a high barrier the chains “look settled yet have not converged.”

Can walking around copy the shape of the hills?

A traveler walks over the hills by a fixed rule and leaves footprints. See whether the pile of footprints gets close to the target shape.

This is a teaching example (the target shape is made from a formula, and the traveler’s steps are decided by random numbers).

Back to Machine Learning — From Probability to GPT (Contents) | Text: Chapter 20, Section 20.2, Chapter 21, Section 21.6 | Equations and explanation (explanation page) | Equations are typeset with the browser’s built-in MathML (no external library).