본문 바로가기
스터디/확률과 통계

[Sampling] Markov Chain Monte Carlo (MCMC) (4) - Slice sampling

by 궁금한 준이 2023. 10. 15.
728x90
반응형

 

 

Slice Sampling

proposal distribution 없이 $p(x)$ 또는 $\tilde{p}(x)$로부터 직접 샘플링하는 방법이다.

일반적으로 univariate multi-modal distribution에 유용하다.

(논문저자 Radford M. Neal에 따르면 multivariate의 경우에도 slice sampling을 변형하여 샘플링 할 수 있다. 여기서는 생략)

 

Algorithm

slice variable $u$를 도입한다. (책에 따라 auxiliary variable, additional variable이라고도 한다.)

\[ p(x,u) = \cfrac{\mathbf {1}_{ \{ 0 \le u \le \tilde{p}(x) \} } }{Z}, \ \int_0^{\tilde{p}(x)} p(x,u) \mathrm{d}u = p(x) \]

 

conditional distribution은 다음과 같이 정의된다.

\[ p(u|x) = \mathbf{1}_{ \{ 0 \le u \le \tilde{p}(x) \} } / \tilde{p}(x) = \text{Unif}(0,\ \tilde{p}(x)) \]

\[ p(x|u) = \cfrac{\mathbf {1}_{ \{ \tilde{p}(x) \ge u \} } }{\int \mathbf{1}_{ \{ \tilde{p}(y) \ge u \} } \mathrm{d}y } = \text{Unif}(\{ \tilde{p}(x) \ge u \}) \]

 

illustration of slice sampling (Maching Learning: A Probabilistic Perspective)

이전 sample $x^{(i)}$에서 시작한다고 하자. 그러면 $[0, f(x^{(i)})]$에서 uniformly하게 sample $u^{(i)}$를 얻는다. 그 다음 sample $x^{(i+1)}$은 slice $f(x) \ge u^{(i)}$에서 샘플링한다.

 

illustration of slice sampling (Pattern Recognition and Machine Learning)

경우에 따라 slice를 정의하는 것이 가능하지 않을 수 있다 (infeasible). ((a)와 같이 slice가 이어지지 않고 끊긴 경우라고 생각된다)  이 경우 previous sample을 포함한 구간에서 샘플링한다. 위 PRML 이미지의 경우, previous sample $z^{(\tau)}$를 포함한 적당한 구간 $[z_{\text{min}},\ z_{\text{max}}]$에서 새로운 샘플 $z^{(\tau + 1)}$을 샘플링한다.

반응형

 

728x90
반응형