zoukankan
html css js c++ java
熵、交叉熵、相对熵(KL 散度)意义及其关系
熵:
H
(
p
)
=
−
∑
x
p
(
x
)
log
p
(
x
)
交叉熵:
H
(
p
,
q
)
=
−
∑
x
p
(
x
)
log
q
(
x
)
相对熵:
K
L
(
p
∥
q
)
=
−
∑
x
p
(
x
)
log
q
(
x
)
p
(
x
)
相对熵(relative entropy)也叫 KL 散度(
KL divergence
);
用来度量两分布之间的
不相似性
(dissimilarity);
通过交叉熵的定义,连接三者:
H
(
p
,
q
)
=
=
=
−
∑
x
p
(
x
)
log
q
(
x
)
−
∑
x
p
(
x
)
log
p
(
x
)
−
∑
x
p
(
x
)
log
q
(
x
)
p
(
x
)
H
(
p
)
+
K
L
(
p
∥
q
)
1. 简森不等式与 KL散度
K
L
(
p
∥
q
)
=
−
∫
p
(
x
)
ln
q
(
x
)
p
(
x
)
d
x
因为
−
ln
x
是凸函数,所以满足,凸函数的简森不等式的性质:
f
(
E
)
≤
E
(
f
)
这里我们令
f
(
⋅
)
=
−
ln
x
,则其是关于
x
的凸函数,因此:
E
(
f
(
)
)
≥
f
(
E
)
⇓
−
∫
p
(
x
)
ln
q
(
x
)
p
(
x
)
d
x
≥
−
ln
∫
q
(
x
)
d
x
=
0
也即 KL 散度恒大于等于 0;
查看全文
相关阅读:
LeetCode "Top K Frequent Elements"
LeetCode "Integer Break"
HackerRank "Angry Children 2"
HackerRank "Kitty and Katty"
HackerRank "Minimum Penalty Path"
HackerRank "Larry's Array"
HackerRank "TBS Problem" ~ NPC
HackerRank "Morgan and a String"
HackerRank "Favorite sequence"
Windows不分区VHD装Linux多系统(三):VM虚拟机安装ubuntu18.04
原文地址:https://www.cnblogs.com/mtcnn/p/9422587.html
最新文章
Do not use built-in or reserved HTML elements as component id:nav
关于flex:1属性的说明
使用uniapp开发的app/小程序需要注意:
沉浸式状态栏只想在小程序显示,H5页面不想显示?
谈谈面试时遇到的uniapp框架的问题?
项目运行出现了301的报错情况
容器查询-----Container Queries
弹性盒子的flex-grow属性
控制容器的宽高比---aspect-ratio
HackerRank "Square Subsequences" !!!
热门文章
LeetCode "Logger Rate Limiter"
LeetCode "Rearrange String k Distance Apart"
LeetCode "Line Reflection"
LeetCode "Russian Doll Envelopes"
LeetCode "Binary Tree Level Order Traversal II" using DFS
LeetCode Potential Thought Pitfalls
HackerRank "Kruskal (MST): Really Special Subtree"
HackerRank "Prim's (MST) : Special Subtree"
LeetCode "Design Tic-Tac-Toe"
HackerRank "New Year Chaos"
Copyright © 2011-2022 走看看