MCMC sampler comparator
What you are seeing: three different random-walk algorithms trying to sample from the same probability density . The grey shading on the left is the density itself (darker = higher probability). Each colored trail is one sampler laying down points: it tries to walk in a way that, in the long run, spends time at each in proportion to .
A "good" sampler explores the whole region quickly and decorrelates; a "bad" sampler gets stuck. The right panels are live trace plots of the coordinate of each chain, plus its acceptance rate and effective sample size . Switch the target to the banana or the funnel to see HMC pull ahead; switch to the mixture to see samplers getting trapped in one mode.
shared/js/engine/mcmc-harness.js; ESS via the
initial monotone sequence estimator from
shared/js/invariants/ess.js.WHAT TO TRY
- Vary each control and watch the rail readouts respond.
- Compare the diagnostic plot against the live scene.