• 对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的由来了吧。所以说数学这东西真的是奥妙无穷,世界上任何想当然的东西都可以用数学来证明,大家好好领会吧!!

  • 相关阅读:
    hdu 4114 Disney's FastPass 状压dp
    lightoj 1381
    bzoj 2428: [HAOI2006]均分数据 随机化
    bzoj 3969: [WF2013]Low Power 二分
    套题:wf2013 (1/8)
    hdu 4119 Isabella's Message 模拟题
    hdu 4118 Holiday's Accommodation 树形dp
    UESTC 2015dp专题 N 导弹拦截 dp
    UESTC 2015dp专题 j 男神的约会 bfs
    UESTC 2015dp专题 H 邱老师选妹子 数位dp
  • 原文地址:https://www.cnblogs.com/txg198955/p/4063541.html
Copyright © 2020-2023  润新知