Dirichlet Distribution

本文介绍了Dirichlet过程(DP),这是一种重要的统计模型,可以视为Dirichlet分布向连续空间的推广。文章从Dirichlet分布的概念出发,逐步引导读者理解如何将其推广为Dirichlet过程,并解释了这一过程中涉及的关键概念。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

引自——http://hi.baidu.com/zcfeiyu123/blog/item/c1fb38dad544ae275982dd97.html

 

Dirichlet Process(DP)是一个很重要的统计模型,其可以看做是Dirichlet分布的一种在连续空间的推广过程。在统计学习中,DP尤其是其变形有很多 重要应用,是非参贝叶斯学习的重要方法。不过目前缺乏对于这样一个模型的入门级的介绍,本文将会介绍如何从Dirichlet分布演变到 Dirichlet Process,从而帮助大家更容易地踏入这个领域。其中也会有很多疏漏,请读者指正。

Dirichlet Distribution

首先,我将简单地介绍Dirichlet分布。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}的概率 是多少。这样我们就在思考骰子六面出现概率分布这样的分布之上的分布。而这样一个分布就是Dirichlet分布。

现在我们给出一个数学化的定义,Dirichlet分布形式如下:

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

其中,满足:

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

Theta是我们所希望的一种分布可能,在上面的例子中,可以认为是{0.2,0.2,0.2,0.2,0.1,0.1}这个结果,注意,这个结果只是其 很多结果中的一种。我们称M为base measure,其定义在我们的事件空间上,在骰子的例子中,就是我们认为,这个骰子的六面分别应该出现的概率。而alpha为一个精度参数,来表示这个 在分布之上的分布,有多靠近M这个基准。这个参数,从一定意义上,可以看做在整个实验之前,我们在脑子中进行的虚拟实验的数量,也就是投掷骰子出现1-6 的总次数。通过这么多次的虚拟实验,我们得到了M这样一个基准,作为我们判别的标志。所进行的虚拟实验的次数越多,我们认为M越可信。

Dirichlet Process

接下来,我们将从Dirichlet分布过渡到Dirichlet Process。

我们再来看刚才那个骰子的例子,我们用一种形式化的语言来描述这个问题:认为骰子的事件空间,就是掷骰子得到1到6中的一个结果为X,则X = {X1,X2,X3,X4,X5,X6}。 那么对于刚才那个问题,就可以看做在这个事件空间之上,有一个分布,用Theta表示。而我们的Dirichlet分布是建立在这个分布之上的分布,其参 数为alpha和M。

现在,我们换一个角度来看这个问题。我们现在是单纯地将骰子分成了6组,每组对应一个独立的事件。事实上,我们完全可以按照我们的想法来对其分组。假如我 们现在对事件空间进行重新分组,则我们将会得到完全不同的结果。比如我们分成3组,每组对应2个事件的话,我们将会得到一个新的Theta,即新的分布。 而我们对于这个新的分布,又能够建立一个新的对应的Dirichlet分布。

好,让我们推广一下,用一些形式化的语言来描述一下一般情况。对于给定的一个事件空间X,我们将其划分为n组,使得其满足:

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

对于这样一个分划,我们可以在其上定义一个对应的Dirichlet分布:

Dirichlet Distribution - Legend - yinwenpeng1987的博客?

我们观察这个分布,我们发现这个式子其实是暗含了,对于事件空间上的任意一种分布,我们都可以有一个对应的Dirichlet分布存在。那么我们定义 Dirichlet Process为所有的划分上的所有分布所构成的空间上的唯一分布。这个定义也许很tricky,我们可以分两层来理解:首先对于事件空间X,是存在各种 分布的,而这些分布可以对应于各种划分。其次,这些分布本身,构成了一个由分布组成的空间,而定义在这个空间之上的分布,就是我们所定义的 Dirichlet Process。

### Dirichlet Distribution in Machine Learning and Statistics The **Dirichlet distribution** is a multivariate probability distribution that plays an important role in both machine learning and statistics. It is often used as the prior distribution over categorical distributions such as multinomial distributions, making it particularly useful in Bayesian inference scenarios where conjugate priors are desired[^2]. In topic modeling, specifically within models like Latent Dirichlet Allocation (LDA), the Dirichlet distribution serves as the prior assumption for document-topic distributions. This means each document has its own mixture of topics drawn from this prior, allowing flexibility while maintaining mathematical tractability due to properties associated with being a conjugate prior. Additionally, probabilistic approaches rooted deeply into artificial intelligence also leverage these concepts extensively; one notable example includes work by Zoubin Ghahramani discussing various aspects including but not limited too applications involving dirchlets under broader context of AI systems development through statistical methods [^4]. Below we provide code demonstrating sampling using Python's `scipy.stats` library: ```python from scipy.stats import dirichlet import numpy as np alpha = np.array([10, 5, 3]) dist = dirichlet(alpha) # Sample from the Dirichlet distribution sample = dist.rvs(size=10) print(sample) ``` #### Characteristics & Applications Summary: - A continuous generalization of Beta Distribution when more than two categories exist. - Used widely across different fields ranging genetics/genomics studies analyzing gene expressions patterns among others areas requiring complex stochastic processes understanding better via computational techniques incorporating ML algorithms leveraging bayesian principles effectively.[^3]
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值