Metropolis-Hastings: A Random Walk That Samples
An interactive live film: the book's two-peaked example sampled by Metropolis-Hastings; proposals are accepted with probability min(1, p(x′)/p(xₜ)), the chain runs into the picture, and its histogram grows into the density. The proposal width decides whether it crawls, mixes or stalls.
Narration
We want samples from this density with two peaks, the blue curve, at minus two and at two. We can evaluate it, but we cannot sample from it directly.
Metropolis Hastings takes a walk. From the current point it proposes a random step, here with a spread sigma of one half.
The rest of the narration is in the book's Companion.
More from Chapter 18
Interactive1:22Langevin Sampling: Drift Uphill, Kick at RandomChapter 18
Preview1:42MALA: Removing Discretization Bias with Accept-RejectChapter 18
Preview1:40Underdamped Langevin and HMC: Momentum-Driven ExplorationChapter 18
Preview1:29Langevin Dynamics and SGLD: Sampling vs OptimizationChapter 18
Preview1:46Speculative Decoding: Exact Sampling With a Draft ModelChapter 18