Content deleted Content added
Citation bot (talk | contribs) Alter: title, class. Add: year, s2cid, author pars. 1-2. Removed parameters. Some additions/deletions were actually parameter name changes. | You can use this bot yourself. Report bugs here. | Suggested by Jrigby87 | via #UCB_arXiv |
m Fixes missing end tags lints |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Short description|Algorithm}}
'''Slice sampling''' is a type of [[Markov chain Monte Carlo]] [[algorithm]] for [[pseudo-random number sampling]], i.e. for drawing random samples from a statistical distribution. The method is based on the observation that to sample a [[random variable]] one can sample uniformly from the region under the graph of its density function.<ref>Damlen, P., Wakefield, J., & Walker, S. (1999). Gibbs sampling for Bayesian non‐conjugate and hierarchical models by using auxiliary variables. Journal of the Royal Statistical Society, Series B (Statistical Methodology), 61(2), 331-344.Chicago</ref><ref name="radford03">{{cite journal
|first=Radford M. |last=Neal
Line 43 ⟶ 44:
Slice sampling gets its name from the first step: defining a ''slice'' by sampling from an auxiliary variable <math>Y</math>. This variable is sampled from <math>[0, f(x)]</math>, where <math>f(x)</math> is either the [[probability density function]] (PDF) of ''X'' or is at least proportional to its PDF. This defines a slice of ''X'' where <math>f(x) \ge Y</math>. In other words, we are now looking at a region of ''X'' where the probability density is at least <math>Y</math>. Then the next value of ''X'' is sampled uniformly from this slice. A new value of <math>Y</math> is sampled, then ''X'', and so on. This can be visualized as alternatively sampling the y-position and then the x-position of points under PDF, thus the ''X''s are from the desired distribution. The <math>Y</math> values have no particular consequences or interpretations outside of their usefulness for the procedure.
If both the PDF and its inverse are available, and the distribution is unimodal, then finding the slice and sampling from it are simple. If not, a stepping-out procedure can be used to find a region whose endpoints fall outside the slice. Then, a sample can be drawn from the slice using [[rejection sampling]]. Various procedures for this are described in detail by [[Radford M. Neal]].<ref name="radford03"/>
Note that, in contrast to many available methods for generating random numbers from non-uniform distributions, random variates generated directly by this approach will exhibit serial statistical dependence. This is because to draw the next sample, we define the slice based on the value of ''f''(''x'') for the current sample.
Line 70 ⟶ 71:
In practice, sampling from a horizontal slice of a multimodal distribution is difficult. There is a tension between obtaining a large sampling region and thereby making possible large moves in the distribution space, and obtaining a simpler sampling region to increase efficiency. One option for simplifying this process is regional expansion and contraction.
* First, a width parameter ''w'' is used to define the area containing the given ''x'' value. Each endpoint of this area is tested to see if it lies outside the given slice. If not, the region is extended in the appropriate direction(s) by ''w'' until the end both endpoints lie outside the slice.
* A candidate sample is selected uniformly from within this region. If the candidate sample lies inside of the slice, then it is accepted as the new sample. If it lies outside of the slice, the candidate point becomes the new boundary for the region. A new candidate sample is taken uniformly. The process repeats until the candidate sample is within the slice. (See diagram for a visual example).
Line 94 ⟶ 95:
[[File:An example of reflection sampling.png|350px|alt=alt text]]
==Example==
|