当前位置:网站首页>Chow-Liu Tree
Chow-Liu Tree
2022-07-02 22:09:00 【古路】
0.引言
- 基础概念参考
- 论文:Approximating discrete probability distributions with dependence trees
we consider the problem of best approximating an nth-order distribution by a product of n - 1 second-order distributions.
The Chow–Liu method describes a joint probability distribution P ( X 1 , X 2 , … , X n ) P(X_{ {1}},X_{ {2}},\ldots ,X_{ {n}}) P(X1,X2,…,Xn) as a product of second-order conditional and marginal distributions. For example, the six-dimensional distribution P ( X 1 , X 2 , X 3 , X 4 , X 5 , X 6 ) P(X_{ {1}},X_{ {2}},X_{ {3}},X_{ {4}},X_{ {5}},X_{ {6}}) P(X1,X2,X3,X4,X5,X6) might be approximated as
P ′ ( X 1 , X 2 , X 3 , X 4 , X 5 , X 6 ) = P ( X 6 ∣ X 5 ) P ( X 5 ∣ X 2 ) P ( X 4 ∣ X 2 ) P ( X 3 ∣ X 2 ) P ( X 2 ∣ X 1 ) P ( X 1 ) P^{ {\prime }}(X_{ {1}},X_{ {2}},X_{ {3}},X_{ {4}},X_{ {5}},X_{ {6}})=P(X_{ {6}}|X_{ {5}})P(X_{ {5}}|X_{ {2}})P(X_{ {4}}|X_{ {2}})P(X_{ {3}}|X_{ {2}})P(X_{ {2}}|X_{ {1}})P(X_{ {1}}) P′(X1,X2,X3,X4,X5,X6)=P(X6∣X5)P(X5∣X2)P(X4∣X2)P(X3∣X2)P(X2∣X1)P(X1)
1.互信息 mutual information
将 互信息 视为边的权重。
2.Chow-Liu Tree 理论基础
Given a joint PDF P ( x ) P(x) P(x), the K L K L KL-divergence D ( P , P ′ ) D\left(P, P^{\prime}\right) D(P,P′) is minimized by projecting P ( x ) \mathrm{P}(\mathrm{x}) P(x) on a maximum-weight spanning tree (MSWT) over nodes in X \mathrm{X} X, where the weight on the edge ( X i , X j ) \left(X_{i}, X_{j}\right) (Xi,Xj) is defined by the mutual information measure
I ( X i ; X j ) = ∑ x i , x j P ( x i , x j ) log P ( x i , x j ) P ( x i ) P ( x j ) I\left(X_{i} ; X_{j}\right)=\sum_{x_{i}, x_{j}} P\left(x_{i}, x_{j}\right) \log \frac{P\left(x_{i}, x_{j}\right)}{P\left(x_{i}\right) P\left(x_{j}\right)} I(Xi;Xj)=xi,xj∑P(xi,xj)logP(xi)P(xj)P(xi,xj)
- 变换后的树与原树具有最小的Kullback-Leible散度。
3.Chow-Liu Tree 算法流程
- 对于分布 P ( x ) P(x) P(x),对于所有的 i ≠ j i≠j i=j,计算联合分布 P ( X i , Y j ) P(X_i,Y_j) P(Xi,Yj);
- 使用第1步得到的概率分布,计算任意两个结点的互信息 I ( X i , Y j ) I(X_i,Y_j) I(Xi,Yj) ,并把 I ( X i , Y j ) I(X_i,Y_j) I(Xi,Yj) 作为这两个结点连接边的权值;
- 计算最大权生成树(Maximum-weight spanning tree)
- a. 初始状态:n个变量(结点),0条边
- b. 插入最大权重的边
- c. 找到下一个最大的边,并且加入到树中;要求加入后,没有环生成。否则,查找次大的边;
- d. 重复上述过程c过程直到插入了n-1条边(树建立完成)
- 选择任意结点作为根,从根到叶子标识边的方向;
- 该生成树的近似联合概率 P ′ ( x ) P'(x) P′(x) 和原贝叶斯网络的联合概率 P ( x ) P(x) P(x) 的相对熵最小。
实际上算法操作流程和最小生成树是一样的,代表算法有 kruskal 与 prim 算法。
4.最小生成树
5.半朴素贝叶斯分类器
- 摘抄自周志华老师《机器学习》(西瓜书)7.4.半朴素贝叶斯分类器.
半朴素贝叶斯分类器的基本想法是适当考虑一部分属性问的相互依赖信息,从而既不需进行完全联合概率计算,又不至于彻底忽略了比较强的属性依赖关系。“独依赖估计” (One-Dependent Estimator ,简称 ODE) 是半朴素贝叶斯分类器最常用的一种策略。顾名思议,所谓"独依赖"就是假设每个属性在类别之外最多仅依赖于一个其他属性,即
P ( c ∣ x ) ∝ P ( c ) ∏ i = 1 d P ( x i ∣ c , p a i ) P(c \mid \boldsymbol{x}) \propto P(c) \prod_{i=1}^{d} P\left(x_{i} \mid c, p a_{i}\right) P(c∣x)∝P(c)i=1∏dP(xi∣c,pai)
其中 p a i p a_{i} pai 为属性 x i x_{i} xi 所依赖的属性, 称为 x i x_{i} xi 的父属性. 此时, 对每个属性 x i x_{i} xi, 若 其父属性 p a i p a_{i} pai 已知, 则可采用类似式 ( 7.20 ) (7.20) (7.20) 的办法来估计概率值 P ( x i ∣ c , p a i ) P\left(x_{i} \mid c, p a_{i}\right) P(xi∣c,pai). 于是, 问题的关键就转化为如何确定每个属性的父属性, 不同的做法产生不同的独依赖分类器。最直接的做法是假设所有属性都依赖于同一个属性,称为"超父 "(super-parent) ,然后通过交叉验证等模型选择方法来确定超父属性,由此形成了SPODE (Super-Parent ODE) 方法.例如,在图 7.1(b) 中, x 1 x_1 x1 是超父属性.
TAN (Tree Augmented naïve Bayes) [Friedman et al., 1997] 则是在最大带权生成树(maximum weighted spanning tree)算法 (Chow-Liu tree)[Chow and Liu, 1968] 的基础上, 通过以下步骤将属性间依赖关系约简为如图 7.1 ( c ) 7.1(\mathrm{c}) 7.1(c) 所示的树形结构:
- (1) 计算任意两个属性之间的条件互信息 (conditional mutual information)
I ( x i , x j ∣ y ) = ∑ x i , x j ; c ∈ Y P ( x i , x j ∣ c ) log P ( x i , x j ∣ c ) P ( x i ∣ c ) P ( x j ∣ c ) I\left(x_{i}, x_{j} \mid y\right)=\sum_{x_{i}, x_{j} ; c \in \mathcal{Y}} P\left(x_{i}, x_{j} \mid c\right) \log \frac{P\left(x_{i}, x_{j} \mid c\right)}{P\left(x_{i} \mid c\right) P\left(x_{j} \mid c\right)} I(xi,xj∣y)=xi,xj;c∈Y∑P(xi,xj∣c)logP(xi∣c)P(xj∣c)P(xi,xj∣c) - (2) 以属性为结点构建完全图, 任意两个结点之间边的权重设为 I ( x i , x j ∣ y ) I\left(x_{i}, x_{j} \mid y\right) I(xi,xj∣y)
- (3) 构建此完全图的最大带权生成树, 挑选根变量, 将边置为有向;
- (4) 加入类别结点 y y y, 增加从 y y y 到每个属性的有向边.
容易看出, 条件互信息 I ( x i , x j ∣ y ) I\left(x_{i}, x_{j} \mid y\right) I(xi,xj∣y) 刻画了属性 x i x_{i} xi 和 x j x_{j} xj 在已知类别情况下的相关性, 因此, 通过最大生成树算法, T A N \mathrm{TAN} TAN 实际上仅保留了强相关属性之间 的依赖性.
边栏推荐
- 全面解析分享购商业模式逻辑?分享购是如何赋能企业
- MySQL查询附近的数据.并按距离进行排序.
- Niuke: Dragon and dungeon games
- 【板栗糖GIS】arcmap—如何批量修改注记要素的字体,颜色,大小等
- 杰理之充电拔出,无法触摸开机【篇】
- 分享 10 个 JS 闭包面试题(图解),进来看看你能答对多少
- go 条件变量
- Wait to solve the zombie process
- Rails 3 activerecord: sort by association count - rails 3 activerecord: order by count on Association
- The threshold value of fusing proportion cannot be changed with sentinel, and setting the slow call proportion has no effect
猜你喜欢
数组进阶提高
牛客网:龙与地下城游戏
性能优化----严苛模式
【板栗糖GIS】arcmap—为什么使用自定义捕捉的时候,经典捕捉的勾要去掉呢?
E-commerce system microservice architecture
Oracle PL / SQL programming
Share 10 JS closure interview questions (diagrams), come in and see how many you can answer correctly
对象与对象变量
mysql重置密码,忘记密码,重置root密码,重置mysql密码
海思3559万能平台搭建:在截获的YUV图像上画框
随机推荐
JS获取display为none的隐藏元素的宽度和高度的解决方案
Array advanced improvement
图形视图框架
`${}`的用法
[micro service sentinel] rewrite Sentinel's interface blockexceptionhandler
Graphic view frame
佩服,竟然有人把高等数学这么晦涩难懂的科目,讲解得如此通俗易懂
钟薛高回应产品1小时不化:含固体成分 融化不能变成水
go 4種單例模式
P7072 [CSP-J2020] 直播获奖
Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
kubernetes 使用主机名将 pod 分配在指定节点上
海思3559万能平台搭建:在截获的YUV图像上旋转操作
Dahua cloud native load balancing article - the passenger flow of small restaurants has increased
php实现根据输入的年龄查询出生日期符合的数据
easyclick,ec权朗网络验证源码
杰理之样机在多次触摸后会触发关机【篇】
海思3559万能平台搭建:在截获的YUV图像上画框
杰理之、产线装配环节【篇】
World Environment Day | Chow Tai Fook serves wholeheartedly to promote carbon reduction and environmental protection