当前位置:网站首页>Chapter 4 决策树和随机森林
Chapter 4 决策树和随机森林
2022-07-27 02:19:00 【桑之未落0208】
目录
1 信息熵
1.1 熵
熵可以理解成概率分布的不确定性的期望值。这个值越大,表示该概率分布不确定性越大。它为我们人类提供的“信息”就越小,我们越难利用这个概率分布做出一个正确的判断。即概率越大越确定,熵就越小。
表达式:
1.2 联合熵
(X,Y)所包含的熵
表达式:
1.3 条件熵
(X,Y)所包含的熵,减去X单独发生包含的熵,即在X发生的前提下,Y发生“新”带来的熵。
表达式:
或者
推导:

1.4 相对熵
相对熵又称互熵、交叉熵、鉴别信息、Kullback熵、Kullback-Leible散度等等。
设p(x)、q(x)是X中取值的两个概率分布,则对p对q的相对熵是


ps:相对熵可以度量两个随机变量的“距离”,想要使得相对熵最小,
是固定的,所以要使得
最大。写成样本为
,求其最大值,即为求最大似然估计。
1.5 互信息
两个随机变量X,Y的互信息,定义为X,Y的联合分布和独立分布乘积的相对熵。
也可以看作H(Y)和H(Y|X)的差值。
表达式:
或:
或:
度量联合分布和独立分布乘积的“距离”;若X,Y相互独立,那么互信息就为0。
第二个公式推导:
第三个公式推导:

1.6 Veen图

2 决策树学习算法
2.1 信息增益
当熵和条件熵中的概率由数据估计(特别是极大似然估计)得到时,所对应的熵和条件熵分别称为经验熵和经验条件熵。
信息增益表示得知特征A的信息而使得类X的信息的不确定性减少的程度。
定义:特征A对训练数据集D的信息增益g(D,A),定义为集合D的经验熵H(D)与特征A给定条件下D的经验条件熵H(D|A)之差,即
.
显然,这是训练数据集D和特征A的互信息。
2.2 ID3、C4.5 、CART
ID3:以信息熵下降速度作为选取测试属性的标准,即在每个节点选取还尚未被用来划分的具有最高信息增益的属性作为划分标准,然后继续这个过程,知道生成的决策树能完美分类训练样例。
C4.5:C4.5算法是ID3算法的一个扩展。使用的是信息增益率。
CART:CART算法也是ID3算法的一个扩展。使用的是Gini系数。
3 信息增益率与Gini系数
3.1 定义

3.2 Gini系数相关讨论
第一定义

第二定义

边栏推荐
- 如何进行 360 评估
- 【正则】判断, 手机号,身份证号
- Connman introduction
- 次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
- Redis spike case, learn from Shang Silicon Valley teacher in station B
- mysql出现不存在错误
- 飞腾腾锐 D2000 荣获数字中国“十大硬核科技”奖
- Csu18m91 is used as the master controller of the intelligent scale scheme
- flask_ Reqparse parser inheritance in restful
- Fastboot刷机
猜你喜欢

网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程

MySQL has a nonexistent error

Spark: ranking statistics of regional advertising hits (small case)

Mysql database related operations

app端接口用例设计方法和测试方法

Spark: calculate the average value of the same key in different partitions (entry level - simple implementation)

复盘:图像有哪些基本属性?关于图像的知识你知道哪些?图像的参数有哪些

How to optimize MySQL

How to interact with the server when the client sends an SQL message

关于使用hyperbeach出现/bin/sh: 1: packr2: not found的解决方案
随机推荐
How to interact with the server when the client sends an SQL message
Double disk: the main differences between DFS and BFS, the differences in ideology, and the differences in code implementation
【树链剖分】2022杭电多校2 1001 Static Query on Tree
Practical application of digital twins: smart city project construction solution
Application, addition and deletion of B-tree
面试题:String类中三种实例化对象的区别
数据库概论 - 数据库的介绍
Permutation and binary (Ji, DA) (day 84)
Typescript TS basic knowledge interface, generics
Use websocket to realize a web version of chat room (fishing is more hidden)
[common search questions] 111
Food chain (day 79)
关于使用hyperbeach出现/bin/sh: 1: packr2: not found的解决方案
How can you access the domestic server and overseas server quickly with one database?
Characteristics and experimental suggestions of abbkine abfluor 488 cell apoptosis detection kit
Explain工具实际操作
It's confirmed that the registration of soft exam in the second half of 2022 will start in August
九方智投是正规公司吗?一起聊聊九方智投
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
Redis spike case, learn from Shang Silicon Valley teacher in station B
