What is: Metropolis Hastings?
Year | 2000 |
Data Source | CC BY-SA - https://paperswithcode.com |
Metropolis-Hastings is a Markov Chain Monte Carlo (MCMC) algorithm for approximate inference. It allows for sampling from a probability distribution where direct sampling is difficult - usually owing to the presence of an intractable integral.
M-H consists of a proposal distribution to draw a parameter value. To decide whether is accepted or rejected, we then calculate a ratio:
We then draw a random number and accept if it is under the ratio, reject otherwise. If we accept, we set and repeat.
By the end we have a sample of values that we can use to form quantities over an approximate posterior, such as the expectation and uncertainty bounds. In practice, we typically have a period of tuning to achieve an acceptable acceptance ratio for the algorithm, as well as a warmup period to reduce bias towards initialization values.
Image: Samuel Hudec