The Dirichlet Distribution 狄利克雷分布 (PRML 2.2.1)

The Dirichlet Distribution 狄利克雷分布 (PRML 2.2.1)

        Dirichlet分布可以看做是分布之上的分布。如何理解这句话,我们可以先举个例子:假设我们有一个骰子,其有六面,分别为{1,2,3,4,5,6}。现在我们做了10000次投掷的实验,得到的实验结果是六面分别出现了{2000,2000,2000,2000,1000,1000}次,如果用每一面出现的次数与试验总数的比值估计这个面出现的概率,则我们得到六面出现的概率,分别为{0.2,0.2,0.2,0.2,0.1,0.1}。现在,我们还不满足,我们想要做10000次试验,每次试验中我们都投掷骰子10000次。我们想知道,出现这样的情况使得我们认为,骰子六面出现概率为{0.2,0.2,0.2,0.2,0.1,0.1}的概率是多少(说不定下次试验统计得到的概率为{0.1, 0.1, 0.2, 0.2, 0.2, 0.2}这样了)。这样我们就在思考骰子六面出现概率分布这样的分布之上的分布。而这样一个分布就是Dirichlet分布。

首先用上面这一段来点直观印象,然后列一些资料:

          维基里面对于狄利克雷分布貌似介绍的挺复杂,不够基础。我找到了一个CMU的PPT:Dirichlet Distribution, Dirichlet Process and Dirichlet Process Mixture,找到一篇华盛顿大学的《Introduction to the Dirichlet Distribution and Related Processes》介绍。

       发现CMU那个ppt里面讲到,Beta is the conjugate prior of Binomial,有一种原来如此的感觉。嗯,原来贝塔分布是二项分布的共轭先验分布,那么狄利克雷分布就是多项分布的共轭先验分布。所以要看狄利克雷分布,就要先了解多项分布,然后呢,想要了解狄利克雷之于多元的关系,就要先看贝塔分布和伯努利分布的关系。所以,二项分布、beta分布、以及共轭这三点是理解狄利克雷分布的关键基础知识,这个基础知识记录在这里(PRML2.1整小章介绍了这个)。

       下面正式进入狄利克雷分布介绍,首先说一下这个多项分布的参数μ。在伯努利分布里,参数μ就是抛硬币取某一面的概率,因为伯努利分布的状态空间只有{0,1}。但是在多项分布里,因为状态空间有K个取值,因此μ变成了向量 μ⃗ =(μ1, , μk)T 。多项分布的likelihood函数形式是 k=1Kμmkk ,因此就像选择伯努利分布的共轭先验贝塔函数时那样,狄利克雷分布的函数形式应该如下:

p(μ|α)k=1Kμαk1k   式2.37

上式中, kμk=1 α⃗ =(α1, , αk)T 是狄利克雷分布的参数。最后把2.37归一化成为真正的狄利克雷分布:

Dir(μ|α)=Γ(α0)Γ(α1)Γ(αk)k=1Kμαk1k

其中 α0=k=1Kαk 。这个函数跟贝塔分布有点像(取K=2时就是Beta分布)。跟多项分布也有点像。就像Beta分布那样,狄利克雷分布就是它所对应的后验多项分布的参数 μ⃗  的分布,只不过μ是一个向量,下图是当 μ⃗ =(μ1,μ2,μ3) 时,即只有三个值时狄利克雷概率密度函数的例子。其中中间那个图的三角形表示一个平放的Simplex,三角形三个顶点分别表示 μ⃗ =(1,0,0) μ⃗ =(0,1,0) μ⃗ =(0,0,1) ,因此三角形中间部分的任意一个点就是 μ⃗  的一个取值,纵轴就是这个 μ⃗  的Simplex上的概率密度值(PDF)。

对于参数 μ⃗  的估计时,可知 后验=似然*先验 的函数形式如下:

p(μ|D,α)(D|μ)p(μ|α)k=1Kμαk+mk1k

从这个形式可以看出,后验也是狄利克雷分布。类似于贝塔分布归一化后验的方法,我们把这个后验归一化一下,得到:

p(μ|D,α)=Dir(μ|α+m)=Γ(α0+N)Γ(α1+m1)Γ(αK+mK)k=1Kμαk+mk1k


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The dramatic growth in practical applications for machine learning over the last ten years has been accompanied by many important developments in the underlying algorithms and techniques. For example, Bayesian methods have grown from a specialist niche to become mainstream, while graphical models have emerged as a general framework for describing and applying probabilistic techniques. The practical applicability of Bayesian methods has been greatly enhanced by the development of a range of approximate inference algorithms such as variational Bayes and expectation propagation, while new models based on kernels have had a significant impact on both algorithms and applications., This completely new textbook reflects these recent developments while providing a comprehensive introduction to the fields of pattern recognition and machine learning. It is aimed at advanced undergraduates or first-year PhD students, as well as researchers and practitioners. No previous knowledge of pattern recognition or machine learning concepts is assumed. Familiarity with multivariate calculus and basic linear algebra is required, and some experience in the use of probabilities would be helpful though not essential as the book includes a self-contained introduction to basic probability theory., The book is suitable for courses on machine learning, statistics, computer science, signal processing, computer vision, data mining, and bioinformatics. Extensive support is provided for course instructors, including more than 400 exercises, graded according to difficulty. Example solutions for a subset of the exercises are available from the book web site, while solutions for the remainder can be obtained by instructors from the publisher. The book is supported by a great deal of additional material, and the reader is encouraged to visit the book web site for the latest information.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值