KL距离,是Kullback-Leibler差异(Kullback-Leibler Divergence)的简称,也叫做相对熵(Relative Entropy)。它衡量的是相同事件空间里的两个概率分布的差异情况。

KL距离全称为Kullback-Leibler Divergence,也被称为相对熵。公式为:

感性的理解,KL距离可以解释为在相同的事件空间P(x)中两个概率P(x)和Q(x)分布的差异情况。
从其物理意义上分析:可解释为在相同事件空间里,概率分布P(x)的事件空间,若用概率分布Q(x)编码时,平均每个基本事件(符号)编码长度增加了多少比特。

信息论解释

如上面展开公式所示,前面一项是在P(x)概率分布下的熵的负数,而熵是用来表示在此概率分布下,平均每个事件需要多少比特编码。这样就不难理解上述物理意义的编码的概念了。
但是KL距离并不是传统意义上的距离。传统意义上的距离需要满足三个条件:1)非负性;2)对称性(不满足);3)三角不等式(不满足)。但是KL距离三个都不满足。反例可以看参考资料中的例子。

+++++++++++++++++++++++++++++++++++++++++++++++++++
作者:肖天睿链接:https://www.zhihu.com/question/29980971/answer/93489660来源:知乎著作权归作者所有,转载请联系作者获得授权。Interesting question, KL divergence is something I'm working with right now.KL divergence KL(p||q), in the context of information theory, measures the amount of extra bits (nats) that is necessary to describe samples from the distribution p with coding based on q instead of p itself. From the Kraft-Macmillan theorem, we know that the coding scheme for one value out of a set X can be represented q(x) = 2^(-l_i) as over X, where l_i is the length of the code for x_i in bits.We know that KL divergence is also the relative entropy between two distributions, and that gives some intuition as to why in it's used in variational methods. Variational methods use functionals as measures in its objective function (i.e. entropy of a distribution takes in a distribution and return a scalar quantity). It's interpreted as the "loss of information" when using one distribution to approximate another, and is desirable in machine learning due to the fact that in models where dimensionality reduction is used, we would like to preserve as much information of the original input as possible. This is more obvious when looking at VAEs which use the KL divergence between the posterior q and prior p distribution over the latent variable z. Likewise, you can refer to EM, where we decomposeln p(X) = L(q) + KL(q||p)Here we maximize the lower bound on L(q) by minimizing the KL divergence, which becomes 0 when p(Z|X) = q(Z). However, in many cases, we wish to restrict the family of distributions and parameterize q(Z) with a set of parameters w, so we can optimize w.r.t. w.Note that KL(p||q) = - \sum p(Z) ln (q(Z) / p(Z)), and so KL(p||q) is different from KL(q||p). This asymmetry, however, can be exploited in the sense that in cases where we wish to learn the parameters of a distribution q that over-compensates for p, we can minimize KL(p||q). Conversely when we wish to seek just the main components of p with q distribution, we can minimize KL(q||p). This example from the Bishop book illustrates this well.

作者:keaidelele
链接:https://www.jianshu.com/p/053e89d3b31b
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

KL距离(衡量两个概率分布的差异情况)相关推荐

  1. 衡量两个概率分布之间的差异性的指标

    衡量两个概率分布之间的差异性的指标 衡量两个概率分布之间的差异性的指标 KL散度(Kullback–Leibler divergence) JS散度(Jensen-Shannon divergence ...

  2. Kullback–Leibler divergence(相对熵,KL距离,KL散度)

    1 前言 注意两个名词的区别: 相对熵:Kullback–Leibler divergence 交叉熵:cross entropy KL距离的几个用途: ① 衡量两个概率分布的差异. ② 衡量利用概率 ...

  3. kl距离 java_KL距离,Kullback-Leibler Divergence

    http://www.cnblogs.com/ywl925/p/3554502.html http://www.cnblogs.com/hxsyl/p/4910218.html http://blog ...

  4. KL距离的计算与含义(转)

    KL距离,是Kullback-Leibler差异(Kullback-Leibler Divergence)的简称,也叫做相对熵(Relative Entropy).它衡量的是相同事件空间里的两个概率分 ...

  5. KL距离,Kullback-Leibler Divergence 浅谈KL散度

    KL距离,是Kullback-Leibler差异(Kullback-Leibler Divergence)的简称,也叫做相对熵(Relative Entropy).它衡量的是相同事件空间里的两个概率分 ...

  6. 向量距离、随机变量相关性与概率分布的差异度量

    向量距离度量 距离的定义: 在一个集合中,如果每一对元素均可唯一确定一个实数,使得三条距离公理(正定性,对称性,三角不等式)成立,则该实数可以称为这对元素之间的距离. 欧氏距离 定义在两个向量(两个点 ...

  7. 衡量两个向量相似度的方法:余弦相似度

    余弦相似度 在NLP的任务里,会对生成两个词向量进行相似度的计算,常常采用余弦相似度公式计算. 余弦相似度用向量空间中两个向量夹角的余弦值作为衡量两个个体间差异的大小.余弦值越接近1,就表明夹角越接近 ...

  8. kl距离 java_信息量、熵、最大熵、联合熵、条件熵、相对熵、互信息。

    一直就对机器学习中各种XX熵的概念比较模糊,现在总结一下自己的学习心得. 信息量 先说一下信息量的概念,其实熵就是信息量的集合. 摘抄个例子: 英文有26个字母,假设每个字母出现的概率是一样的,每个字 ...

  9. 信息论:信息熵+信息散度(交叉熵\kl距离)

    信息散度(交叉熵\kl距离) 思考题:对于只用A,B,C,D四个单词写的信使用0和1进行编码的一个信息的平均编码长度?思考题:对于只用A,B,C,D四个单词写的信\\ 使用0和1进行编码的一个信息的平 ...

  10. Matlab 显著性检测模型评价算法之KL距离

    KL距离是用来计算两个概率分布函数的差异大小: h是ground thruth map,p是saliency map,当h和p完全相等时,KL值为0 现在一般用对称形式,即h和p换个位置,求个KL,两 ...

最新文章

  1. ATS 4.2.3隐藏服务器名称及版本号的方法
  2. R语言format函数保留几位小数实战
  3. MCSE2003学习之四
  4. contiki源码阅读之list
  5. 那些年,画家发明的黑科技
  6. @interface使用详解
  7. 央视报道:荣耀智慧屏或搭载华为鸿蒙系统
  8. 又到年关,年终奖你能拿多少?
  9. /plus/recommend.php sql注入漏洞,DedeCMS 全版本通杀SQL注入漏洞利用代码及工具 -
  10. redis 公网 安全_redis配置之安全配置
  11. deeplearning.ai——构建一个LR分类器来识别猫
  12. GCC 编译安装在线文档
  13. Angular端口4200被占用后如何处理
  14. TensorFlow中CNN的两种padding方式“SAME”和“VALID”
  15. 网络系统管理赛项之Debian七. 2021年全国职业院校技能大赛将挑选各省1人或1组队伍参赛
  16. 微信小程序开发入门(二)image标签及图片样式
  17. html盒子两个背景图片,css怎么实现两张图片叠加在一起,css添加盒子背景图片
  18. Android 滑动方向整理
  19. JAVA_树状表格分页(layUI、treeTable.js)
  20. JWT验证机制【Python版Flask或自己写的后端可以用】【刘新宇】

热门文章

  1. macOS Mojave下解决wine中文乱码问题
  2. 武汉加油!爬取百度迁徙地图数据+城市出行强度
  3. java负载均衡搭建_负载均衡环境搭建(nginx和tomcat)
  4. 记录一下我的游戏私服搭建(台服dnf)
  5. dnf服务器不维修,dnf无法修理装备
  6. 磁测仪高斯计与特斯拉计、磁通计的区别
  7. 别人教我学计算机的作文,我学会了电脑作文(通用3篇)
  8. Matlab 取整函数
  9. Ubuntu14.04(LTS)gitHub客户端安装
  10. 苹果手机密码锁如何解锁