Interactive MCMC samplers in the browser

Two small demos that run a Markov chain Monte Carlo sampler in the browser, with the algorithm written in plain, editable MATLAB syntax running via numbl.

  • Hit-and-run — uniform sampling of a 2D region.
  • WALNUTS — the within-orbit adaptive leapfrog No-U-Turn Sampler, using Nawaf Bou-Rabee’s reference MATLAB code from the paper.

Open a demo, hit Run, and play the movie to step through the algorithm.

Click the Code button to open an IDE where you can edit the MATLAB syntax and rerun the sampler.

Screenshot of concept-collection.github.io/hitandrun-interactive
concept-collection.github.io/hitandrun-interactive →
Screenshot of concept-collection.github.io/walnuts-interactive
concept-collection.github.io/walnuts-interactive →

← All posts