feng's Blog

Happy coding

Relevance Vector Machine 2

feng posted @ Mon, 01 Oct 2012 19:39:44 +0800 in PRML , 2041 readers

接下来,我们讨论一下在已经得到训练样本的情况下,$\mathbf{w}$的后验概率。

--------------------------------------------------------------------------------------------------------------------------------------------

在获得训练数据之前。$\mathbf{w}$是0均值的,那么给定一个$\mathbf{x}$之后,期望的输出应该是0。现在得到训练数据之后,我们可能发现输出的$\mathbf{t} = [t_1, t_2, ..., t_N]^T$并不完全是0。这个时候,在给定的训练数据之后,我们可以计算出来$\mathbf{x}$的后验概率。也就是计算

\[p(\mathbf{w}|\mathbf{t}, \mathbf{X}, \mathbf{\alpha}, \beta)\]。

在这里,我们暂时应该把$\mathbf{\alpha}$和$\beta$看作是已知的,或者说实在给定的情况下。根据概率公式,我们有

\[p(\mathbf{w}|\mathbf{t}, \mathbf{X}, \mathbf{\alpha}, \beta) = \frac{p(\mathbf{w}|\mathbf{\alpha})p(\mathbf{t}|\mathbf{X}, \mathbf{\alpha}, \beta)}{p(t|\mathbf{X}, \mathbf{\alpha}, \beta)}\]。

首先看分母,分母其实是一个归一化的参数,保证了对$\mathbf{w}$在整个空间上积分的值为1。再看一下分子,第一项是一个关于$\mathbf{w}$的高斯分布,第二项也是一个高斯分布。参数$\mathbf{w}$都在这个高斯分布的指数上面,并且可以看出,都是关于$\mathbf{w}$的二项式。也就是说,从这里我们可以断定,这个$\mathbf{w}$的后验概率,也是一个高斯分布。如果对于高斯分布的具体形式不是很清楚的话,请看附录。

 

既然是一个高斯分布,我们只需要求解出来它的均值和方差就行了。在这里,我们只需要计算化简指数上面跟$\mathbf{w}$相关的二项式。我们把这个二项式写出来

\[-\frac{1}{2}\mathbf{w}^T A \mathbf{w} - \frac{1}{2}\sum_{i = 1}^{N}{\beta(t_i - \mathbf{w}^T \phi(\mathbf{x}_i))^2}\]

这里的$A = diag(\alpha_i)$。接下来进行化简,化简的过程中,我们可以尽情的扔掉与$\mathbf{w}$无关的项。最后得到的结果为

\[-\frac{1}{2}(\mathbf{w}^T(A + \beta \Phi^T\Phi)\mathbf{w} - 2\beta \mathbf{w}^T\Phi^T\mathbf{t})\]

其中$\Phi$是一个矩阵,每一行是一个样本$\phi_{\mathbf{x}_i}^T$。根据前面的讨论,我们已经知道$\mathbf{w}$的后验概率是一个高斯分布,假定其均值为$\mathbf{m}$,协方差矩阵为$\Sigma$,那么它的指数项为

\[-\frac{1}{2}(\mathbf{w} - \mathbf{m})^T\Sigma^{-1}(\mathbf{x} - \mathbf{m}) = -\frac{1}{2}(\mathbf{w}^T\Sigma^{-1}\mathbf{w} - 2 \mathbf{w}^T\Sigma^{-1}\mathbf{m})+const\]

这里面的$const$代表了跟$\mathbf{w}$无关系的项。这两项进行对比,我们可以得到如下的结论

\[\Sigma = (A + \beta\Phi^T\Phi)^{-1}\]

\[\mathbf{m} = \beta\Sigma\Phi^{T}\mathbf{t}\]

 

自此,我们得到了在给定训练样本的情况下,参数$\mathbf{w}$的后验概率。

 

附录

1,高斯函数

\[\mathcal{N}(\mathbf{x}|\mathbf{m}, \mathbf{\Sigma}) = \frac{1}{(2\pi)^{D/2}|\Sigma|^{1/2}} exp{-\frac{1}{2}(\mathbf{x} - \mathbf{m})^T \Sigma^{-1} (\mathbf{x} - \mathbf{m})}\]

Avatar_small
AAA said:
Sat, 01 Jan 2022 15:12:12 +0800

Tremendous guide! Make took pleasure in the exact looking at. I hope to find out much from your business. My partner and i you might incredible knowledge together with view. What i’m particularly fascinated in this area material. 토토사이트

Avatar_small
AAA said:
Thu, 17 Feb 2022 04:57:53 +0800

when i am relaxing, i would love to just hear some instrumental music instead of regualr music,. 토토사이트

Avatar_small
meidir said:
Tue, 23 Aug 2022 17:48:42 +0800

Hi my friend! I want to say that this post is amazing, nice written and include approximately all significant infos. I’d like to see more posts like this . 바카라사이트

Avatar_small
meidir said:
Fri, 26 Aug 2022 19:21:08 +0800

Hiya, I’m really glad I have found this information. Nowadays bloggers publish only about gossip and net stuff and this is actually frustrating. A good site with interesting content, this is what I need. Thank you for making this website, and I will be visiting again. Do you do newsletters? I Can’t find it. 온라인바카라

Avatar_small
sssd said:
Tue, 08 Nov 2022 23:31:21 +0800

You could definitely see your expertise in the work you write. The sector hopes for more passionate writers such as you who aren’t afraid to say how they believe. All the time go after your heart. 琉璃

 

============

 

Wow, marvelous blog format! How lengthy have you ever been blogging for? you make blogging look easy. The full look of your web site is excellent, as smartly the content material! 腳架

 

============

 

Great blog here! after reading, I felt pleasure Macbook air

 

============

 

There is noticeably big money to comprehend this. I assume you’ve made particular nice points in functions also. MacBook回收

Avatar_small
meidir said:
Thu, 17 Nov 2022 02:07:20 +0800

You need to take part in a contest for among the very best blogs on the internet. I will recommend this internet site! 스포츠토토사이트

Avatar_small
meidir said:
Wed, 23 Nov 2022 21:08:40 +0800

faith. I don?t know if finest practices have emerged round issues like that, but I’m sure that your job is clearly recognized as a good game. Each boys and restaurant baden-baden

Avatar_small
meidir said:
Wed, 23 Nov 2022 22:40:13 +0800

Good day”i am doing research right now and your blog really helped me.    RSG電子

Avatar_small
meidir said:
Mon, 28 Nov 2022 00:39:33 +0800

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why throw away your intelligence on just posting videos to your weblog when you could be giving us something informative to read? 카지노사이트


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter