Gibbs Sampling basics:
* estimating an unknown distribution by sampling
* iteratively sampling marginal and conditional distributions to approximate full distribution--useful when exact methods are intractable
* An instance of Markov Chain Monte Carlo (MCMC) methods, and Metropolis-Hastings methods in particular.
* It can implement complex models, but it requires "burn in time" (a number of initialization steps to eliminate artifacts and settle into a usable state), and sometimes can be slow to converge.
Things to note from "gstut_SimpleBivariateExample.R"/"gibbs.r":
* First page is direct sampling of bivariate Gaussian (10000 samples)
graphs first page:
top: point scatterplot, connected line walking points
middle: plot of X coords, plot of Y coords
bottom: histogram marginal X dist, histo marginal Y dist
* Second page is simple Gibbs sampling approximation
Gibbs sampler method:
(0,0) start
Each successive point:
conditional dist of X|y is sampled for next x
conditional dist of Y|x is sampled for next y
First sample X coord is chosen
Top: note walk produces similar scatter and walk
Middle: Gibbs sampling is different due to correlation from
sampling method (autocorrelated due to dependence on
previous samples)
Bottom: Despite correlation, marginal distributions look
broadly same as direct result
Jordan "Intro MCMC for Machine Learning" by:
Christophe Andrieu, Nando de Freitas, Arnaud Doucet, Michael I. Jordan
Page 21 (sec 3.4) discusses Gibbs sampler and figure 12 on page 22
outlines general method: From a starting sample, repeatedly march
through your coordinates and estimate that coordinate by sampling
the conditional distribution of that coordinate given your current
point. Repeat.
Its most basic use is to estimate a distribution but it can also be
used for optimization.
Some other properties for Gibbs Samplers:
* "Block Gibbs Sampling"
Links:
* "Stochastic Modelling for Molecular Biology" (1/ed) by
Professor Darren Wilkinson:
http://www.staff.ncl.ac.uk/d.j.wilkinson/smfsb/1e/index.html
The precise page discussing this Gibbs Sampler example is:
http://www.mas.ncl.ac.uk/~ndjw1/teaching/sim/gibbs/gibbs.html
This is an annotated copy of the 'gibbs.r' file available from
the aforementioned page. A direct link to it is:
http://www.mas.ncl.ac.uk/~ndjw1/teaching/sim/gibbs/gibbs.r
* "An Introduction to MCMC for Machine Learning"
Comments (0)
You don't have permission to comment on this page.