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

  • 相关阅读:
    delete records in table A not in table B
    图片上传5-多个图片上传,独立项目Demo和源码
    图片上传5-多个图片上传,独立项目Demo和源码
    商业模式(二):P2P网贷平台,利差和服务费为主的金融玩法
    商业模式(二):P2P网贷平台,利差和服务费为主的金融玩法
    商业模式(一):北京秒针公司,以互联网广告监测服务为主的生财之道
    使用DrawerLayout实现侧拉菜单
    关于ComponentName的使用
    商业模式系列-序
    小的时候.by小雷
  • 原文地址:https://www.cnblogs.com/txg198955/p/4063541.html
Copyright © 2020-2023  润新知