PRML-公式推导 - 3.49 3.50 3.51

证明
贝叶斯定理\(p(w|t)\propto p(t|w)p(w)\)
代入3.10 ,3.48
\(p(\textbf{t}|\textbf{X},w,\beta) = \prod\limits_{n=1}^N\mathcal{N}(t_n|w^T\phi(x_n),\beta^{-1})\)
\(p(w) = \mathcal{N}(w|m_0,S_0)\)

\(p(w|t)\propto exp[-\frac{\beta}{2}(t_1-w^T\phi_1)^2] exp[-\frac{\beta}{2}(t_2-w^T\phi_2)^2]...exp[-\frac{\beta}{2}(t_n-w^T\phi_n)^2]exp[-\frac{1}{2}(w-m_0)^TS_0^{-1}(w-m_0)]\)
\(=exp[-\frac{\beta}{2}\{(t_1-w^T\phi_1)^2+...+(t_n-w^T\phi_n)^2\}]exp[-\frac{1}{2}(w-m_0)^TS_0^{-1}(w-m_0)]\)
\(=exp[-\frac{\beta}{2}\begin{pmatrix} t_1-w^T\phi_1\\ ...\\ t_n-w^T\phi_n \end{pmatrix}^T\begin{pmatrix} t_1-w^T\phi_1\\ ...\\ t_n-w^T\phi_n \end{pmatrix}]exp[-\frac{1}{2}(w-m_0)^TS_0^{-1}(w-m_0)]\)
\(=exp[-\frac{\beta}{2}(T-\Phi w)^T(T-\Phi w)]exp[-\frac{1}{2}(w-m_0)^TS_0^{-1}(w-m_0)]\)
其中
\(T=\begin{pmatrix} t_1\\ ...\\ t_n \end{pmatrix}^T\)\(\Phi w^T=\begin{pmatrix} \phi_1^Tw\\ ...\\ \phi_n^Tw \end{pmatrix}=\begin{pmatrix} w^T\phi_1\\ ...\\ w^T\phi_n \end{pmatrix}^T\)
\(=exp[-\frac{1}{2}(\beta T^TT-\color{red}{\beta T^T\Phi w}-\color{green}{\beta(\Phi w)^TT }+ \color{blue}{\beta w^T\Phi^T\Phi^T w}+ \color{blue}{w^TS_0^{-1}w} -\color{red}{m_0^TS_0^{-1}w}-\color{green}{w^TS_0^{-1}m_0 }+m_0^TS_0^{-1}m_0)]\)
\(=exp[-\frac{1}{2}(\color{blue}{w^T(S_0^{-1}+\beta \Phi^T\Phi)w}-\color{green}{w^T(S_0^{-1}m_0+\beta\Phi^TT)}-\color{red}{(\beta T^T\Phi + m_0^TS_0^{-1})w}+m_0^TS_0^{-1}m_0+\beta T^T T)]\),同色的相结合
3.50式\(m_N=S_N(S_0^{-1}m_0+\beta \Phi^TT)\)
3.51式\(S_N^{-1}=S_0^{-1}+\beta\Phi^T\Phi\)
用配方法,不确定可以反向乘开来验证
\(=exp[-\frac{1}{2}(w-m_N)^TS_N^{-1}(w-m_N)]exp[-\frac{1}{2}(m_0^TS_0^{-1}m_0+\beta ^TT+m_N^TS_N^Tm_N)]\)
\(=C\times exp[-\frac{1}{2}(w-m_N)^TS_N^{-1}(w-m_N)]\),因为后面一项和w没有关系


方法2 利用前面2.3.3 章节的结论

对于\(x\)的边缘高斯分布和\(y\)关于\(x\)的条件高斯分布:

\[p(x) = \mathcal{N}(x|\mu,\Lambda^{-1}) \tag{2.113} \]

\[p(y|x) = \mathcal{N}(y|Ax + b,L^{-1}) \tag{2.114} \]

那么\(y\) 的边缘分布和\(x\)关于\(y\)的条件高斯分布为:

\[p(y) = \mathcal{N}(y|A\mu + b,L^{-1} + A\Lambda^{-1}A^T) \tag{2.115} \]

\[p(x|y) = \mathcal{N}(x|\Sigma\left\{A^TL(y-b) + \Lambda\mu \right\},\Sigma) \tag{2.116} \]

其中

\[\Sigma = (\Lambda + A^TLA)^{-1} \tag{2.117} \]

posted @ 2022-03-21 20:24  筷点雪糕侠  阅读(97)  评论(0编辑  收藏  举报