From eb2803bc987b91688de6731c9edb325ecaa8d11d Mon Sep 17 00:00:00 2001 From: Hu Zhao <zhao@mbd.rwth-aachen.de> Date: Sat, 15 Apr 2023 17:59:35 +0200 Subject: [PATCH] docs: add description of metropolis hastings sampling --- docs/source/sampler/metropolis_hastings.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/source/sampler/metropolis_hastings.rst b/docs/source/sampler/metropolis_hastings.rst index 6b2c868..cedb0b5 100644 --- a/docs/source/sampler/metropolis_hastings.rst +++ b/docs/source/sampler/metropolis_hastings.rst @@ -1,6 +1,27 @@ 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 ------------------------ -- GitLab