Code Monkey home page Code Monkey logo

mcmc-demo's Introduction

The Markov-chain Monte Carlo Interactive Gallery

Example: Hamiltonian Monte Carlo

Click on an algorithm below to view an interactive demo where you can change algorithm parameters on-the-fly:

Standard MCMC methods

Non-Markovian iterative sampling methods

References

[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.

[6] J. Buchner A statistical test for Nested Sampling algorithms Statistics and Computing. 2014.

[7] Cajo J. F. ter Braak & Jasper A. Vrugt Differential Evolution Markov Chain with snooker updater and fewer chains Statistics and Computing. 2008.

Running locally

Clone or download the repository and open index.html in your web browser. All dependencies are included in in lib/.

Adding an algorithm

  1. Copy one of the existing algorithms in the algorithms directory (a good starting point is algorithms/HamiltonianMC.js).
  2. in app.html include the your algorithm's javascript file at the bottom of the page. This will add your algorithm to the dropdown menu.
  3. Add any new visualizations to the 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)
  4. Add a link to your algorithm in README.md and index.html

See also

Interactive Gaussian process regression demo

https://github.com/chi-feng/gp-demo

mcmc-demo's People

Contributors

chi-feng avatar johannesbuchner avatar julianoks avatar kaleidoglobe-gh avatar micahjsmith avatar michaelosthege avatar qacwnfq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.