对cost函数的概率解释

    Likehood函数即似然函数,是概率统计中经常用到的一种函数,其原理网上很容易找到,这里就不讲了。这篇博文主要讲解Likelihood对回归模型的Probabilistic interpretation。

在我们的回归模型中由于其他因素的影响我们的预测函数为:

                                                                           image

    其中image  为影响预测的其他因素或者说噪声,我们假设这些噪声IID,我们知道随机独立同分布的噪声服从Gaussian distribution,imageimage则:

                                                                        image

    This implies that:

                                                                         image

    那么现在的问题转换为这样的:Given X (the design matrix, which contains all the x(i)’s) and θ, what is the distribution of the y(i)’s?  怎样来解决这个问题,我们想到了概率论里面的最大似然函数(Maximum likelihood),极大似然函数就是寻求参数的估计值image 使得在给定的样本下,联合概率达到最大。其求解过程是这样的,令:

                                                                          image

    The principal of maximum likelihood says that we should should choose θ so as to make the data as high probability as possible. I.e., we should choose θ
to maximize L(θ). Instead of maximizing L(θ), we can also maximize any strictly increasing function of L(θ). In particular, the derivations will be a bit simpler if we instead maximize the log likelihood ℓ(θ):

                                                                          image

    Hence,我们只要minimizing 式子image 就可以minimizing image,到这里大家看这个式子就可以知道了 Linear Regression中的cost函数image的由来了吧。所以说数学这东西真的是奥妙无穷,世界上任何想当然的东西都可以用数学来证明,大家好好领会吧!!

posted on 2014-10-30 19:59  Kevin.Tu  阅读(1644)  评论(0编辑  收藏  举报