Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
data_analysis:mcmc [2020/04/19 05:40] – prgram | data_analysis:mcmc [2025/07/07 14:12] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== mcmc ====== | ====== mcmc ====== | ||
- | + | http://chi-feng.github.io/mcmc-demo/ | |
- | ===== Bayesian Inference ===== | + | |
- | psychologically appealing | + | |
- | In most cases, 두 방법의 solution이 비슷하고, | + | |
- | + | ||
- | ---- | + | |
- | === Procedure === | + | |
- | 1. parameter의 확률분포 선택 (prior distritubtion) | + | |
- | 2. model $ f(x|\theta) $ 선택 | + | |
- | 3. 데이터 $X_i$ 관측 후, posterior $ f(\theta|X_1, | + | |
- | + | ||
- | Frequentist 접근은 density function $f(x|\theta)$ 를 $\theta$에 대한 함수로 보고 문제 접근 : likelihood | + | |
- | + | ||
- | posterior | + | |
- | $ p(\theta|x) = {{p(x|\theta)\pi(\theta)}\over{\int_{\Theta} p(x|\theta)\pi(\theta) d\theta}} \propto p(x|\theta)\pi(\theta) $ | + | |
- | $p(.|\ehta)$ : likelihood, $\pi(.)$ : prior density function | + | |
- | + | ||
- | ---- | + | |
- | prior 선택에 따라 두 가지로 분류 | + | |
- | conjugate : prior - posterior same distribution famiy. : reasonable feature, 계산(closed analytics form) | + | |
- | + | ||
- | non-conjugate : no cloded form. 분모의 적분을 계산하기 힘듬 | + | |
- | + | ||
- | + | ||
- | ===Bayes factor=== | + | |
- | for 모델 비교 | + | |
- | + | ||
- | $ BF = { {p(y|H_1)}\over{p(y|H_2)} } = { {\int p(\theta_1|H_1) p(y|\theta_1, | + | |
- | $\theta_i$ : $H_i$의 parameters, y:data | + | |
- | + | ||
- | 해석 : posterior odds ratio $ \propto $ BF * prior odds ratio ( p(H_j)끼리 비율) (<-Bayes정리) | + | |
- | BF : posterior odds / prior odds | + | |
- | prior belief가 포함됨. 외부 정보를 가설에 추가하게 되는 효과 | + | |
- | >1 : data가 H_1을 더 지지함 | + | |
- | + | ||
- | Kass and Raftery(1995) : BF is very general, model들이 nested아니어도 됨 | + | |
- | + | ||
- | integration : numerical method가 필요함 | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== MCMC ==== | + | |
$ E_\pi[T(X)] = \int T(x)\pi(x) dx. $ | $ E_\pi[T(X)] = \int T(x)\pi(x) dx. $ | ||