5_Sampling Flashcards
Rejection Sampling (Algorithm)
(1) Generate z0 ~q(y) [x-axis]
(2) Generate u0 ~ U[0, kq(z0)]
(3) If u0 > \tilde(p)(z0), reject the sample; retain z0 otherwise
Markov Chain Monte Carlo Objective
Generate samples from an unknown target distribution.
Target distribution: the distribution we are interested in (e.g., posterior)
MCMC detailed balance
Detailed balance, for all x, x’:
p^(x) T(x’ | x) = p^(x’) T(x | x’)
Also ensures that the Markov chain is reversible
Metropolis-Hastings Algorithm
(1) Generate proposal x’ ~ q(x’ | x^{(t)})
(2) If
(q(x^{(t)} | x’) * \tilde{p}(x’)) / (q(x’ | x^{(t)}) * \tilde{p}(x^{(t)}) >= u,
where u ~ U[0, 1]
accept the sample x^{(t+1)} = x’; otherwise set x^{(t+1)} = x^{(t)}
What can you tell about the acceptance rate in the beginning of the Metropolis-Hastings Algorithm?
In the beginning, a lot of samples get accepted as we move towards the area of our \tilde{p} distribution
Is there a relation between step size and acceptance rate of the Metropolis-Hastings Algorithm?
- Big step size => low acceptance rate
- Small step size => high acceptance rate
Slice Sampling Algorithm
Repeat the following steps:
(1) Draw u | x^{(t)} ~U[0, \tilde{p}(x)]
(2) Draw x={(t+1)} | u ~ U[{x: \tilde{p}(x) > u }], this is our ‘slice’