# Dirichlet分布

## dirichlet 分布

[Dirichlet distribution](https://en.wikipedia.org/wiki/Dirichlet_distribution)

它是关于多项分布的分布。从$$Dir(\alpha,K)$$分布中每次抽样，得到的都是一个K维随机向量，且是一个离散分布。

举个例子：一堆骰子，不全相同，即每个骰子摇出的点数都是一个分布。现在问，这个分布的分布是多少，即每种骰子的分布。

$$\alpha$$是concentration parameter，控制Dirichlet分布的形状，或者说，是控制不同多项分布的概率密度（注意：这里的随机变量是抽出的多项分布）。$$\alpha$$的具体作用，可以根据Dirichlet分布的密度函数推导，但更直观的方法是利用Polya urn模型：

假设一个盒子里最初有K种颜色的球各$$\alpha$$个（应作推广理解：$$\alpha$$可取任意正实数），每一次，从盒中随机取出一个球（在推广情形下，就是按盒中球数的分布选取一种颜色），把球放回，并且再向盒子中放进一个同样颜色的球。进行同样的操作N次，当N趋于无穷时，盒子中不同颜色的球数分布（K项分布）就服从Dirichlet分布。

$$\alpha$$到底有什么作用？试试把$$\alpha$$分别设成0.01, 1, 100，自己模拟一下就会明白了。

[dirichlet.pdf](http://www.cs.cmu.edu/~epxing/Class/10701-08s/recitation/dirichlet.pdf) 这个pdf上写的很清楚，就不照抄了

## Dirichlet Process

[Dirichlet process](https://en.wikipedia.org/wiki/Dirichlet_process)

[Dirichlet Distribution（狄利克雷分布）与Dirichlet Process（狄利克雷过程）](http://www.datalearner.com/blog/1051459673766843)

假设一个模型是由k个高斯模型混合而成，那么建模时超参k设为多少合适呢。（注意不能把k也作为参数一起去求导求解，那样最优解是以每个样本为均值，0方差的模型）。

Dirichlet过程的价值：\
非参数方法，无需事先预设cluster的数量，可推广到可数无穷个mixtures的情形；Bayesian方法，比传统的非参数统计更优美。Dirichlet作为多项分布的共轭先验，可以绕过推断过程中涉及的一些复杂的积分运算，使得构造有效的推断算法成为可能。

[Dirichlet Processes 是一个什么样的随机过程](https://www.zhihu.com/question/22717561)\
[LDA-math-认识Beta/Dirichlet分布](http://cos.name/2013/01/lda-math-beta-dirichlet/)\
[\[LDA数学八卦-2\]认识Beta/Dirichlet分布](http://www.flickering.cn/数学之美/2014/06/lda数学八卦认识betadirichlet分布/)\
[认识Beta/Dirichlet分布](http://xinsong.github.io/2014/04/29/beta/)\
[概率与统计-chapter0-三个重要函数](http://computationalads.github.io/2015/07/04/beta-gamma-dirichlet-function/)\
[The Dirichlet Distribution 狄利克雷分布 (PRML 2.2.1)](http://www.xperseverance.net/blogs/2012/03/510/)\
[机器学习的数学基础（1）--Dirichlet分布](http://blog.csdn.net/jwh_bupt/article/details/8841644)\
[【机器学习中的数学】多项式分布及其共轭分布](http://www.jianshu.com/p/5883933236b5)\
[Dirichlet分布与Dirichlet过程--非参贝叶斯推断学习](http://paley.mydiscussion.net/?p=332\&ckattempt=1)\
[Infinite Mixture Models with Nonparametric Bayes and the Dirichlet Process](http://blog.echen.me/2012/03/20/infinite-mixture-models-with-nonparametric-bayes-and-the-dirichlet-process/)

[深入理解Dirichlet过程](http://www.jianshu.com/p/096a8a7ca173)

[隐式狄利克雷分布](https://zhuanlan.zhihu.com/p/29257655)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://json007.gitbook.io/svm/math-probability/dirichletfen_bu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
