Skip to content
Snippets Groups Projects
Commit eb2803bc authored by Hu Zhao's avatar Hu Zhao
Browse files

docs: add description of metropolis hastings sampling

parent 7b48a6ce
No related branches found
No related tags found
No related merge requests found
Metropolis Hastings Sampling Metropolis Hastings Sampling
============================ ============================
Metropolis Hastings sampling is a widely used Markov Chain Monte Carlo (MCMC)
algorithm for generating a sequence of samples from a target probability
distribution where direct sampling is difficult. The samples can be used to
estimate properties of the target distribution, like its mean, variance, and higher
moments. The samples can also be used to approximate the target distribution,
for example via a histogram. The algorithm works by constructing a Markov chain
with a stationary distribution equal to the target distribution.
Steps of the algorithm are as follows:
1. Choose an initial state for the Markov chain, usually from the target distribution.
2. At each iteration, propose a new state by sampling from a proposal distribution.
3. Calculate the acceptance probability.
4. Accept or reject the proposed state based on the acceptance probability.
5. Repeat steps 2-4 for a large number of iterations to obtain a sequence of samples.
6. Apply "burn-in" and "thining".
Final samples from the Markov chain can then be used to estimate the target
distribution or its properties.
MetropolisHastings Class MetropolisHastings Class
------------------------ ------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment