Interactive Markov-chain Monte Carlo Javascript demos
JavaScript
941
135 commits
updated Aug 28, 2026
Example: Hamiltonian Monte Carlo
Click on an algorithm below to view an interactive demo where you can change algorithm parameters on-the-fly:
[1] H. Haario, E. Saksman, and J. Tamminen, An adaptive Metropolis algorithm (2001)
[2] M. D. Hoffman, A. Gelman, The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo (2011)
[3] G. O. Roberts, R. L. Tweedie, Exponential Convergence of Langevin Distributions and Their Discrete Approximations (1996)
[4] Li, Tzu-Mao, et al. Anisotropic Gaussian mutations for metropolis light transport through Hessian-Hamiltonian dynamics ACM Transactions on Graphics 34.6 (2015): 209.
[5] Q. Liu, et al. Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithm Advances in Neural Information Processing Systems. 2016.
[7] Cajo J. F. ter Braak & Jasper A. Vrugt Differential Evolution Markov Chain with snooker updater and fewer chains Statistics and Computing. 2008.
[8] Jakob Robnik, G. Bruno De Luca, Eva Silverstein, Uroš Seljak Microcanonical Hamiltonian Monte Carlo (2022)
Clone or download the repository and open index.html in your web browser. All dependencies are included in in lib/.
algorithms directory (a good starting point is algorithms/HamiltonianMC.js).app.html include the your algorithm's javascript file at the bottom of the page. This will add your algorithm to the dropdown menu.Visualizer.prototype.dequeue function defined in main/Visualizer.js. The MCMC simulation adds visualization "events" onto an animation queue. Most common events such as accepting or rejecting a proposal have already been implemented. The renderer composites the contents of three offscreen canvases (densityCanvas, samplesCanvas, and overlayCanvas)README.md and index.htmlInteractive Gaussian process regression demo
https://github.com/chi-feng/gp-demo
18 followers · starred Dec 2022
512 followers · starred Mar 2023
29 followers · starred Jan 2020
409 followers · starred Jan 2020
Interactive Markov-chain Monte Carlo Javascript demos
JavaScript
941
135 commits
updated Aug 28, 2026
Example: Hamiltonian Monte Carlo
Click on an algorithm below to view an interactive demo where you can change algorithm parameters on-the-fly:
[1] H. Haario, E. Saksman, and J. Tamminen, An adaptive Metropolis algorithm (2001)
[2] M. D. Hoffman, A. Gelman, The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo (2011)
[3] G. O. Roberts, R. L. Tweedie, Exponential Convergence of Langevin Distributions and Their Discrete Approximations (1996)
[4] Li, Tzu-Mao, et al. Anisotropic Gaussian mutations for metropolis light transport through Hessian-Hamiltonian dynamics ACM Transactions on Graphics 34.6 (2015): 209.
[5] Q. Liu, et al. Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithm Advances in Neural Information Processing Systems. 2016.
[7] Cajo J. F. ter Braak & Jasper A. Vrugt Differential Evolution Markov Chain with snooker updater and fewer chains Statistics and Computing. 2008.
[8] Jakob Robnik, G. Bruno De Luca, Eva Silverstein, Uroš Seljak Microcanonical Hamiltonian Monte Carlo (2022)
Clone or download the repository and open index.html in your web browser. All dependencies are included in in lib/.
algorithms directory (a good starting point is algorithms/HamiltonianMC.js).app.html include the your algorithm's javascript file at the bottom of the page. This will add your algorithm to the dropdown menu.Visualizer.prototype.dequeue function defined in main/Visualizer.js. The MCMC simulation adds visualization "events" onto an animation queue. Most common events such as accepting or rejecting a proposal have already been implemented. The renderer composites the contents of three offscreen canvases (densityCanvas, samplesCanvas, and overlayCanvas)README.md and index.htmlInteractive Gaussian process regression demo
https://github.com/chi-feng/gp-demo
18 followers · starred Dec 2022
512 followers · starred Mar 2023
29 followers · starred Jan 2020
409 followers · starred Jan 2020