-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhouhou_MCMC.tex
149 lines (138 loc) · 7.38 KB
/
houhou_MCMC.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
\section{$B%^%k%3%UO":?%b%s%F%+%k%mK!(B(MCMC)$B$K$h$k%9%Q%$%/%=!<%F%#%s%0(B}
$B$3$N<jK!$O!"%9%Q%$%/EE0L$N8:?j$K$r9MN8$KF~$l$?%9%Q%$%/%=!<%F%#%s%0$N<jK!$G$"$k!#(B
$B$3$N<jK!$G$O!"%9%Q%$%/EE0L$N8:?j$K4X$9$k3NN(%b%G%k(B\eqref{eq:prob_model}$B$rMQ$$$F!"%=!<%F%#%s%0$r9T$&!#(B
$B:G=i$K!"=i4|CM$H$7$F!"@5$7$$$+$I$&$+$O$H$b$+$/!"3F%9%Q%$%/$KE,Ev$J%9%Q%$(B
$B%/%i%Y%k$r@_Dj$7$F$*$/!#(B
$B$3$N2>Dj$7$?%9%Q%$%/%i%Y%k$r3NN(%b%G%k$HHf3S$7$F!"=$@5$9$k!J@5$7$/$J$$$H(B
$B9M$($l$P!"%i%Y%k$rB>$N%i%Y%k$KJQ99$9$k!K$H$$$&%9%F%C%W$rH?I|$9$k;v$K$h$j!"(B
$B@5$7$$%i%Y%k$K6a$E$1$k$H$$$&%=!<%F%#%s%0$N<jK!$G$"$k!#(B
$B$3$N$h$&$J<jK!$O!"(BPouzat$B$K$h$C$F:G=i$K3+H/$5$l$?(B(Pouzat 2004)
\cite{Pouzat_C_2004_improved},\cite{Pouzat_C_2004_technique}
$B$?$@$7!"(BPouzat$B$N3NN(%b%G%k$O!"%9%Q%$%/$NEE0L$N8:?j$@$1$G$J$/!"(B
ISI Histgram$B$N3NN(J,I[$b9MN8$KF~$l$F$$$k!#$^$?!"B?E@EE6K$rBP>]$K$7$?$b$N(B
$B$G$"$k!#(B
$BK\8&5f$H$N0c$$$O!"K\8&5f$N3NN(%b%G%k$O%9%Q%$%/EE0L$N8:?j$N$_$r3NN(%b%G%k(B
$B$K9MN8$7!"$3$N<jK!$r%&%'!<%V%l%C%H2r@O$K$h$k%9%Q%$%/%=!<%F%#%s%0$NJd40$K(B
$B;H$*$&$H$9$kE@$G$"$k!#(B
\par
$B$3$N<jK!$O!"%Y%$%:$NDjM}$H%^%k%3%UO":?%b%s%F%+%k%mK!(B(MCMC)$B$K$h$C$F<BAu$5(B
$B$l$?!#(B
$B%Y%$%:$NDjM}$H%^%k%3%UO":?%b%s%F%+%k%mK!(B(MCMC)$B$K$D$$$F$O!"IUO?$K=q$$$?!#(B
\subsection{$B8:?j$N3NN(%b%G%k(B}
$B%9%Q%$%/EE0L$N8:?j%b%G%k(B\fgref{spsort_idea_gensui}
$a$$B$O%9%Q%$%/$NEE0L$rI=$7!J%9%Q%$%/GH7A$N%T!<%/CM$dGH7A$N%G!<%?!K!"(B
$a_{pre}$$B$O$R$H$D<jA0$N%9%Q%$%/$NEE0L$rI=$9!#(B
$\delta$$B!"(B$\lambda$$B$ODj?t$G$"$k!#(B
\begin{equation}
a = \left( 1 - \delta \exp(-\lambda \varDelta t) \right) a_{pre}
\label{eq:gensui}
\end{equation}
$B$3$N%b%G%k$G$O!"(BISI$B$,C;$1$l$PC;$$$[$I8:?jN($,Bg$-$/$J$k!#(B
$B>e<0$K$D$$$F$O!"(B(Fee 1996)\cite{MS_Fee_1996}$B$GDs0F$5$l$F$$$k(B(\fgref{fig:Fee_Model_Prob})$B!#(B
$BK\8&5f<<$G$b(B($B5H@n(B 2004)\cite{Yoshikawa_2004}$B$K$*$$$F!"%P!<%9%HH/2P;~$K$*$$$F!"%9%Q(B
$B%$%/EE0L$,8:?j$9$k$3$H$,3NG'$5$l$?!#(B
\par
\eqref{eq:gensui}$B$r4p$K(B,$B<!$N$h$&$J3NN(%b%G%k$r:n$C$?!#(B
$B3NN(%b%G%k$G$O!"%b%G%k$+$iM=B,$5$l$kEE0L(B\eqref{eq:gensui}$B$H<B:]$NEE0L$H$N8m:9$,(B
$a-a_{pre}(1-\delta \exp(-\lambda \varDelta t)$
$B$G$"$k3NN($N3NN(J,I[$r@55,J,I[(B
$N(0,\tau^{2})$$B$G$"$k$H$7$?!#(B\fgref{fig:Fee_Model_Prob}
\begin{eqnarray}
P_{amp}(a|\varDelta t,\delta,\lambda)
&=& \frac{1}{\sqrt{2 \pi\sigma}}\exp
\left( -\frac{1}{2\sigma^{2}} \left|a-a_{pre}(1 - \delta \exp(-
\lambda \varDelta t) \right|^{2} \right)
\label{eq:prob_model} \\
\sigma &=& 0.1 \left( 1 - \delta \exp(-\lambda \varDelta t) \right) a_{pre}
\end{eqnarray}
$B$3$3$G!"I8=`JP:9(B$\sigma$$B$O!"%b%G%k$+$iM=B,$5$l$kEE0L(B\eqref{eq:gensui}$B$N(B0.1$BG\$H$7$?!#(B
%\begin{equation}
% \sigma = 0.1 \left( 1 - \delta \exp(-\lambda \varDelta t) \right) a_{pre}
%\end{equation}
\par
%$B3NN(%b%G%k(B\eqref{eq:prob_model}$B$+$i!"(B
$n$$B8D$N%9%Q%$%/EE0L$NCM$HH/2P;~4V$NJ,$+$k%9%Q%$%/Ns$r(B
$D=\{ \left( a_{0},\varDelta t_{i} \right),\left( a_{0},\varDelta t_{i}
\}\right),\dots \left( a_{n},\varDelta t_{n} \right)\}$
$B$HI=$9!#(B
$B3NN(%b%G%k(B\eqref{eq:prob_model}$B$+$i!"%9%Q%$%/Ns(B$D$
$B$r4QB,$9$k3NN($r9M$($k!#(B
$B:G=i$K!"0l$D$N%K%e!<%m%s$,O"B3$7$F(Bn$B8D$N%9%Q%$%/$,H/2P$7$F$$$k>u67$r9M$($k!#(B
2$B$D$NA08e$9$k%9%Q%$%/$N3NN(%b%G%k$O!"(B\eqref{eq:prob_model}$B$G@h$[$IN)$F$?$+$i!"(B
$BO"B3$7$F(Bn$B8D$N%9%Q%$%/$,H/2P$7$F!"4QB,%G!<%?(B
$D$
$B$r4QB,$9$k3NN((B$P(D|\delta,\lambda)$$B$O(B
%$C=\{ C_{1},C_{2},\dots,C_{n} \}$
\begin{eqnarray}
P(D|\delta,\lambda) = \prod_{i}
P_{amp} \left( a_{i}|\varDelta_{i},\delta,\lambda \right)
\label{n-ko}
\end{eqnarray}
$B$H$J$k!#(B
\par
$B<!$K!"(B$i(i=1,2,\dots)$$B8D$N%K%e!<%m%s$+$iH/2P$5$l$k%9%Q%$%/Ns$NH/2P$r9M$($k!#(B
$B3F(Bi$B8D$N%K%e!<%m%s$K$D$$$F!"(B\eqref{n-ko}$B$HF1$8$h$&$K9M$($l$P$h$$$+$i!"(B
$B3F%K%e!<%m%s(B$i(i=1,2,\dots)$$B$N(B$\delta,\lambda$$B$r(B$\delta_{i},\lambda_{i}$
$B$H$7$F!"(B
\begin{eqnarray}
P(D|\delta,\lambda) = \prod_{$B3F%K%e!<%m%s(Bi(i=1,2,\dots)$B$K$D$$$F(B}$B!!(B\left( \prod_{i}
P_{amp} \left( a_{i}|\varDelta_{i},\delta_{i},\lambda_{i} \right) \right)
\label{eq:yuudo}
\end{eqnarray}
\par
$B8=<B$K$O!"2f!9$O4QB,%G!<%?(B$D$
$B$rCN$k;v$,$G$-$k$,!"3F%K%e!<%m%s(B$i(i=1,2,\dots)$$B$N(B
$\delta_{i},\lambda_{i}$$B$K$D$$$F$OJ,$+$i$J$$!#(B
$B$7$+$7!"(B$\delta_{i},\lambda_{i}$$B$K3NN(J,I[$r2>Dj$7$F!";vA0J,I[(B$P(\delta_{i})$B!"(B
P(\lambda_{i})$$B$H@_Dj$9$k$H!"(B
$BL`EY4X?t$O(B\eqref{eq:yuudo}$B$h$j(B$P(D|\delta_{i},\lambda_{i})$$B$@$+$i(B,
$B%Y%$%:$NDjM}(B($BIUO?(B\ref{sec:Bayes_Stat})$B$h$j!"$=$N;v8e3NN($O!"(B
\begin{eqnarray}
P_{post}(\delta,\lambda|D) &=&
\frac{P(D|\delta,\lambda)P(\delta)P(\lambda)}
{Z} \\
&\propto&
P(D|\delta,\lambda)P(\delta)P(\lambda)
\label{eq:posterior}
\end{eqnarray}
$B$H$J$j!";vA03NN((B$P(\delta_{i}),P(\lambda_{i})$$B$HL`EY4X?t(B$P(D|\delta_{i},\lambda_{i})$
$B$+$i!";v8e3NN((B$P_{post}(\delta_{i},\lambda_{i}|D)$$B$,7W;;$G$-$k!#(B
$B$3$3$G(B$Z$$B$O5,3J2=Dj?t$G!"(B
$Z=\int P(D|\delta,\lambda)P(\delta)P(\lambda) d \delta d\lambda$$B$G$"$k$,!"(B
$B%a%H%m%]%j%9(B-$B%X%$%9%F%#%s%0%"%k%4%j%:%`(B($BIUO?(B\ref{sec:Metropolis})$B$rMQ$$$k:]$K$O!"(BZ$B$r7W;;$9$kI,MW$OL5$$!#(B
\subsection{MCMC$BK!$G$N%9%Q%$%/%=!<%F%#%s%0(B}
$B;vA0J,I[$H$7$F0lMMJ,I[(B$\delta_{i},\lambda_{i}$$B$r@_Dj$9$k(B
($P(\delta_{i}) \subset (0.1,0.9)$,$P(\lambda_{i}) \subset (1,200)$)$B!#(B
$\delta_{i},\lambda_{i}$$B$NDs0FJ,I[$H$7$F!"?lJb2aDx(B($BIUO?(B\ref{sec:randomwalk})
$B$r:NMQ$7$?!#(B
$B%a%H%m%]%j%9(B-$B%X%$%9%F%#%s%0%"%k%4%j%:%`(B($BIUO?(B\ref{sec:Metropolis})$B$rMQ$$$F!";v8eJ,I[(B
$P_{post}(\delta_{i},\lambda_{i}|D)$$B$r7W;;$9$k!#(B
$B<B:]$K;v8e3NN($r7W;;$9$k:]$K$O!"(B\eqref{eq:posterior}$B$NN>JU$KBP?t$r$H$C$?!"BP?tL`EY4X?t(B
\begin{equation}
\log{P_{post}(\delta_{i},\lambda_{i}|D)} =
\log{P(D|\delta_{i},\lambda_{i})} + \log{P(\delta_{i})} + \log{P(\lambda_{i})} + C
\label{eq:log-posterior}
\end{equation}
$B$r7W;;$9$k!#(B
$B%9%Q%$%/(Bn$B8D$N%9%Q%$%/%i%Y%k(B$C_{i}$$B$H3F%K%e!<%m%s$N%Q%i%a!<%?$K$D$$$F(B
\begin{equation}
C_{i}^{(t-1)} \rightarrow \delta_{C_{i}}^{(t-1)}\rightarrow \lambda_{C_{i}}^{(t-1)}
\rightarrow C_{i+1}^{(t-1)} \rightarrow \dots \rightarrow \dots
\rightarrow C_{i}^{(t)} \rightarrow \dots
\end{equation}
$B$H%a%H%m%]%j%9(B-$B%X%$%9%F%#%s%0%"%k%4%j%:%`$N%9%F%C%W$r7+$jJV$;$P!"(B
\eqref{eq:log-posterior}
$B$,<}B+$7!"$=$N$H$-$N%9%Q%$%/%i%Y%k(B$C_{i}$$B$O@5$7$/%=!<%F%#%s%0$5$l$k$O$:(B
$B$G$"$k!#(B
\par
MCMC$B$K$h$k%9%Q%$%/%=!<%F%#%s%0$O!"E}7WJ*M}$K$*$1$k(BPotts$B%b%G%k$H8F$P$l$k<'@-BN(B
$B$N%9%T%s%b%G%k$N%b%s%F%+%k%m(B$\cdot$$B%7%_%e%l!<%7%g%s$HNI$/;w$F$$$k!#(B
$B%9%T%s$N8~$-$r%9%Q%$%/$N%i%Y%k$NHV9f$K(B,$B<'@-BN$N%(%M%k%.!<$,(B
\eqref{eq:posterior}$B$KBP1~$7$F$$$k!#(B
\section{$B5?;wMp?t$K$D$$$F(B}
$B%9%Q%$%/%7%_%e%l!<%?$d(BMCMC$BK!$G$O!"BgNL$K5?;wMp?t$r@8@.$7$F;HMQ$9$kI,MW$,$"$k!#(B
$BK\8&5f$G$O5?;wMp?t$N@8@.%"%k%4%j%:%`$K$D$$$F$O!"(B"Mersenne-Twister$BK!(B"$B$r:N(B
$BMQ$7$?!#(B
R$B8@8l$G$O(B(Matsumoto and Nishimura 1998) \cite{Matsumoto_1998} $B$N(B twisted GFSR $BK!$,I8=`$N5?;wMp?t@[email protected]?t$H$J$C$F$$$k(B\cite{Manual_R_2006}$B!#(B
$B$3$N<jK!$O!"<~4|(B $2^{19937 - 1} \left( =4.315 x 10^{60001} \right))$$B$G!"$9$Y$F$N<~4|$K4X$7(B 623 $B<!856u4V$K6Q0lJ,I[$9$k0lMMMp?t$r@8@.$9$k!#$3$l$O=>Mh$N@~7A9gF1K!Ey$N<jK!$KHf$Y3JCJ$KD9$$<~4|$G$"$k!#(B
$BMp?t<o$O(B32$B%S%C%H@0?t$N(B624$B<!85%Y%/%H%k!\$=$NCf$N8=:_0LCV$r<($9@0?t$G$"$k!#(B