本稿で取り扱う確率伝搬法は効率的に確率推論問題を解くための手法である.
そこでまず、ここで考える確率推論問題の定式化を行ない, 分配法則に基づく確率伝搬法の計算原理について説明する
$\Large \displaystyle p(x_{1},\ldots,x_{N}) \equiv Pr\{X_{1}=x_{1}, \ldots, X_{N}=x_{N}\}$
$\Large \displaystyle Pr(X_i=a|X_{m+1}=a_{m+1},\ldots,X_{N}=a_{N})\ \ \ \ i=1,\ldots,m\ \ \ \ (2)$
$\Large \displaystyle Pr(X_1=a|X_{m+1}=a_{m+1},\ldots,X_{N})=\alpha\sum_{x_2,\ldots, x_m}p(a,x_2,\ldots,x_m,a_{m+1},\ldots,a_N)$
$\Large \displaystyle p(x_1,\ldots,x_N)=p(x_1)p(x_2,\ldots,x_N|x_1)$
$\Large \displaystyle =p(x_1)p(x_2|x_1)p(x_3,\ldots,x_N|x_1,x_2)$
$\Large \displaystyle \ \ \ \ \ \vdots$
$\Large \displaystyle =p(x_1)p(x_2|x_1)p(x_3|x_1, x_2)\ldots p(x_N|x_1,x_2,\ldots,x_{N-1})\ \ \ \ (3)$
$\Large \displaystyle p(x_1,x_2,x_3,x_4,x_5)$
$\Large =\displaystyle p(x_1)p(x_2|x_1)p(x_3|x_1,x_2)p(x_4|x_1,x_2,x_3)p(x_5|x_1,x_2,x_3,x_4)$
$\Large =\displaystyle p(x_1)p(x_2|x_1)p(x_3|x_1,x_2)p(x_4|x_1,x_3)p(x_5|x_4)$
$\Large \displaystyle f(X)=f(x_1,\cdots,x_n)$
$\Large \displaystyle =f_1(A_1)f_2(A_2)\cdots f_m(A_m)$
図1 ファクターグラフの接続ルール |
$\Large \displaystyle p(x_1,x_2,\cdots,x_n)=p(x_1)p(x_2|x_1)p(x_3|x_2)\cdots p(x_{n}|x_{n-1})$
$\Large \displaystyle p(x_1,x_2,\cdots,x_n)=f_1(x_1)f_2(x_1, x_2)f_3(x_2, x_3)\cdots f_n(x_{n-1}, x_n)$
図2 ファクターグラフの例 (マルコフ連鎖) |
$\Large \displaystyle p(x_1,x_2,x_3,x4,x_5)=p(x_1)p(x_2|x_1)p(x_3|x_4)p(x_4|x_1)p(x_5|x_4)$
$\Large \displaystyle f(x_1,x_2,x_3,x4,x_5)=f_1(x_1)f_2(x_1,x_2)f_4(x_3,x_4)f_3(x_1, x_4)f_5(x_4, x_5)$
図3 ファクターグラフの例(その他) |
$\Large \displaystyle f(X)=f(x_1, x_2,\ldots, x_n)$
$\Large \displaystyle =f_1(A_1)f_2(A_2)\ldots f_m(A_m)$
$\Large \displaystyle g_i(x_i)=\sum_{X\backslash x_i}f(X)$
$\Large \displaystyle M_{x_k,f_k}(x_k)=\prod_{a\in N(x_k)\backslash f_i}M_{a,x_k}(x_k)$
$\Large \displaystyle M_{x_k,f_k}(x_k)=1$
図4 「sum-product」アルゴリズム (変数ノードでの処理) |
図5 「sum-product」アルゴリズム (関数ノードでの処理) |
$\Large \displaystyle a(b+c)=ab+ac$
$\Large \displaystyle a\sum_{i=1}^n b_i=\sum_{i=1}^n ab_i$
$\Large \displaystyle \boxed{A}\longrightarrow\boxed{B}\longrightarrow\boxed{C}\longrightarrow\boxed{D}$
$\Large \displaystyle P(A,B,C,D)=P(D|C)P(C|B)P(B|A)P(A)$
$\Large \displaystyle P(C|D)=\frac{P(C,D)}{P(D)}=\frac{1}{\alpha}\sum_B \sum_A P(A,B,C,D)$
$\Large \displaystyle =\frac{1}{\alpha}\sum_B \sum_A (P(D|C)P(C|B)P(B|A)P(A))$
$\Large \displaystyle P(B|D)=\frac{P(B,D)}{P(D)}=\frac{1}{\beta}\sum_B \sum_A P(A,B,C,D)$
UUID:「cba20d00-224d-11e6-9fb8-0002a5d5c51b」