请输入您要查询的百科知识:

 

词条 Dirichlet distribution
释义

  1. Probability density function

     Support  Special cases 

  2. Properties

     Moments  Mode  Marginal distributions  Conjugate to categorical/multinomial  Relation to Dirichlet-multinomial distribution  Entropy  Aggregation  Neutrality  Characteristic function  Inequality 

  3. Related distributions

     Conjugate prior of the Dirichlet distribution 

  4. Applications

  5. Random number generation

     Gamma distribution  Proof  Marginal beta distributions 

  6. Intuitive interpretations of the parameters

     The concentration parameter  String cutting  Pólya's urn 

  7. See also

  8. References

  9. External links

{{Probability distribution |
  name       =Dirichlet Distribution|  type       =density|  pdf_image  =||  cdf_image  =|  parameters = number of categories (integer)
concentration parameters, where | support = where and | pdf =
where
where | cdf =| mean =

(see digamma function)| median =| mode =| variance =
where
and
| skewness =| kurtosis =| entropy =
with defined as for variance, above.|

}}

In probability and statistics, the Dirichlet distribution (after Peter Gustav Lejeune Dirichlet), often denoted , is a family of continuous multivariate probability distributions parameterized by a vector of positive reals. It is a multivariate generalization of the beta distribution[1], hence its alternative name of Multivariate Beta distribution (MBD)[2]. Dirichlet distributions are commonly used as prior distributions in Bayesian statistics, and in fact the Dirichlet distribution is the conjugate prior of the categorical distribution and multinomial distribution.

The infinite-dimensional generalization of the Dirichlet distribution is the Dirichlet process.

Probability density function

The Dirichlet distribution of order K ≥ 2 with parameters α1, ..., αK > 0 has a probability density function with respect to Lebesgue measure on the Euclidean space RK−1 given by

where belong to the standard simplex, or in other words:

The normalizing constant is the multivariate beta function, which can be expressed in terms of the gamma function:

Support

The support of the Dirichlet distribution is the set of K-dimensional vectors whose entries are real numbers in the interval (0,1); furthermore, , i.e. the sum of the coordinates is 1. These can be viewed as the probabilities of a K-way categorical event. Another way to express this is that the domain of the Dirichlet distribution is itself a set of probability distributions, specifically the set of K-dimensional discrete distributions. Note that the technical term for the set of points in the support of a K-dimensional Dirichlet distribution is the open standard (K − 1)-simplex,[3] which is a generalization of a triangle, embedded in the next-higher dimension. For example, with K = 3, the support is an equilateral triangle embedded in a downward-angle fashion in three-dimensional space, with vertices at (1,0,0), (0,1,0) and (0,0,1), i.e. touching each of the coordinate axes at a point 1 unit away from the origin.

Special cases

A common special case is the symmetric Dirichlet distribution, where all of the elements making up the parameter vector have the same value. The symmetric case might be useful, for example, when a Dirichlet prior over components is called for, but there is no prior knowledge favoring one component over another. Since all elements of the parameter vector have the same value, the symmetric Dirichlet distribution can be parametrized by a single scalar value α, called the concentration parameter.{{Citation needed|date=November 2011}} In terms of α, the density function has the form

When α=1{{ref|concentration-parameter-disambiguation}}, the symmetric Dirichlet distribution is equivalent to a uniform distribution over the open standard (K − 1)-simplex, i.e. it is uniform over all points in its support. This particular distribution is known as the flat Dirichlet distribution. Values of the concentration parameter above 1 prefer variates that are dense, evenly distributed distributions, i.e. all the values within a single sample are similar to each other. Values of the concentration parameter below 1 prefer sparse distributions, i.e. most of the values within a single sample will be close to 0, and the vast majority of the mass will be concentrated in a few of the values.

More generally, the parameter vector is sometimes written as the product of a (scalar) concentration parameter α and a (vector) base measure where lies within the (K − 1)-simplex (i.e.: its coordinates sum to one). The concentration parameter in this case is larger by a factor of K than the concentration parameter for a symmetric Dirichlet distribution described above. This construction ties in with concept of a base measure when discussing Dirichlet processes and is often used in the topic modelling literature.

{{note|concentration-parameter-disambiguation}} If we define the concentration parameter as the sum of the Dirichlet parameters for each dimension, the Dirichlet distribution with concentration parameter K, the dimension of the distribution, is the uniform distribution on the (K − 1)-simplex.

Properties

Moments

Let , meaning that the first K – 1 components have the above density and .

Let

Then[4][5]

Furthermore, if

Note that the matrix so defined is singular.

More generally, moments of Dirichlet-distributed random variables can be expressed as[6]

Mode

The mode of the distribution is[7] the vector (x1, ..., xK) with

Marginal distributions

The marginal distributions are beta distributions:[8]

Conjugate to categorical/multinomial

The Dirichlet distribution is the conjugate prior distribution of the categorical distribution (a generic discrete probability distribution with a given number of possible outcomes) and multinomial distribution (the distribution over observed counts of each possible category in a set of categorically distributed observations). This means that if a data point has either a categorical or multinomial distribution, and the prior distribution of the distribution's parameter (the vector of probabilities that generates the data point) is distributed as a Dirichlet, then the posterior distribution of the parameter is also a Dirichlet. Intuitively, in such a case, starting from what we know about the parameter prior to observing the data point, we then can update our knowledge based on the data point and end up with a new distribution of the same form as the old one. This means that we can successively update our knowledge of a parameter by incorporating new observations one at a time, without running into mathematical difficulties.

Formally, this can be expressed as follows. Given a model

then the following holds:

This relationship is used in Bayesian statistics to estimate the underlying parameter p of a categorical distribution given a collection of N samples. Intuitively, we can view the hyperprior vector α as pseudocounts, i.e. as representing the number of observations in each category that we have already seen. Then we simply add in the counts for all the new observations (the vector c) in order to derive the posterior distribution.

In Bayesian mixture models and other hierarchical Bayesian models with mixture components, Dirichlet distributions are commonly used as the prior distributions for the categorical variables appearing in the models. See the section on applications below for more information.

Relation to Dirichlet-multinomial distribution

In a model where a Dirichlet prior distribution is placed over a set of categorical-valued observations, the marginal joint distribution of the observations (i.e. the joint distribution of the observations, with the prior parameter marginalized out) is a Dirichlet-multinomial distribution. This distribution plays an important role in hierarchical Bayesian models, because when doing inference over such models using methods such as Gibbs sampling or variational Bayes, Dirichlet prior distributions are often marginalized out. See the article on this distribution for more details.

Entropy

If X is a Dir(α) random variable, the information entropy of X:[9] is

here is the digamma function.

The following formula for can be used to derive the information entropy above. The exponential family differential identities can be used to get an analytic expression for the expectation of and its associated covariance matrix:{{Citation needed|date=June 2011}}

and

where is the digamma function, is the trigamma function, and is the Kronecker delta.

The spectrum of Rényi information for values other than is given by[10]

and the information entropy is the limit as goes to 1.

Aggregation

If

then, if the random variables with subscripts i and j are dropped from the vector and replaced by their sum,

This aggregation property may be used to derive the marginal distribution of mentioned above.

Neutrality

{{main|Neutral vector}}

If , then the vector X is said to be neutral[11] in the sense that XK is independent of [3] where

and similarly for removing any of . Observe that any permutation of X is also neutral (a property not possessed by samples drawn from a generalized Dirichlet distribution).[12]

Combining this with the property of aggregation it follows that Xj + ... + XK is independent of . In fact it is true, further, for the Dirichlet distribution, that for , the pair , and the two vectors and , viewed as triple of normalised random vectors, are mutually independent. The analogous result is true for partition of the indices {1,2,...,K} into any other pair of non-singleton subsets.

Characteristic function

The characteristic function of the Dirichlet distribution is a confluent form of the Lauricella hypergeometric series. It is given by Phillips[13] as

where and

The sum is over non-negative integers and . Phillips goes on to state that this form is "inconvenient for numerical calculation" and gives an alternative in terms of a complex path integral:

where L denotes any path in the complex plane originating at , encircling in the positive direction all the singularities of the integrand and returning to .

Inequality

Probability density function plays a key role in a multifunctional inequality which implies various bounds for the Dirichlet distribution

[14].

Related distributions

For K independently distributed Gamma distributions:

we have:[15]{{Rp|402}}

Although the Xis are not independent from one another, they can be seen to be generated from a set of K independent gamma random variable.[15]{{Rp|594}} Unfortunately, since the sum V is lost in forming X (in fact it can be shown that V is stochastically independent of X), it is not possible to recover the original gamma random variables from these values alone. Nevertheless, because independent random variables are simpler to work with, this reparametrization can still be useful for proofs about properties of the Dirichlet distribution.

Conjugate prior of the Dirichlet distribution

Because the Dirichlet distribution is an exponential family distribution it has a conjugate prior.

The conjugate prior is of the form:[16]

Here is a K-dimensional real vector and is a scalar parameter. The domain of is restricted to the set of parameters for which the above unnormalized density function can be normalized. The (necessary and sufficient) condition is:[17]

Given a single observed Dirichlet observation , the posterior is given as

In the published literature there is no practical algorithm to efficiently generate samples from .

Applications

Dirichlet distributions are most commonly used as the prior distribution of categorical variables or multinomial variables in Bayesian mixture models and other hierarchical Bayesian models. (Note that in many fields, such as in natural language processing, categorical variables are often imprecisely called "multinomial variables". Such a usage is unlikely to cause confusion, just as when Bernoulli distributions and binomial distributions are commonly conflated.)

Inference over hierarchical Bayesian models is often done using Gibbs sampling, and in such a case, instances of the Dirichlet distribution are typically marginalized out of the model by integrating out the Dirichlet random variable. This causes the various categorical variables drawn from the same Dirichlet random variable to become correlated, and the joint distribution over them assumes a Dirichlet-multinomial distribution, conditioned on the hyperparameters of the Dirichlet distribution (the concentration parameters). One of the reasons for doing this is that Gibbs sampling of the Dirichlet-multinomial distribution is extremely easy; see that article for more information.

Random number generation

Gamma distribution

With a source of Gamma-distributed random variates, one can easily sample a random vector from the K-dimensional Dirichlet distribution with parameters . First, draw K independent random samples from Gamma distributions each with density

and then set

Proof

The joint distribution of is given by:

Next, one uses a change of variables, parametrising in terms of and , and performs a change of variables from such that

One must then use the change of variables formula, in which is the transformation Jacobian.

Writing y explicitly as a function of x, one obtains

The Jacobian now looks like

The determinant can be evaluated by noting that it remains unchanged if multiples of a row are added to another row, and adding each of the first K-1 rows to the bottom row to obtain

which can be expanded about the bottom row to obtain

Substituting for x in the joint pdf and including the Jacobian, one obtains:

Note that each of the variables and likewise .

Finally, integrate out the extra degree of freedom and one obtains:

Which is equivalent to

with support

Below is example Python code to draw the sample:

params = [a1, a2, ..., ak]

sample = [random.gammavariate(a,1) for a in params]

sample = [v/sum(sample) for v in sample]

This formulation is correct regardless of how the Gamma distributions are parameterized (shape/scale vs. shape/rate) because they are equivalent when scale and rate equal 1.0.

Marginal beta distributions

A less efficient algorithm[18] relies on the univariate marginal and conditional distributions being beta and proceeds as follows. Simulate from

Then simulate in order, as follows. For , simulate from

and let

Finally, set

This iterative procedure corresponds closely to the "string cutting" intuition described below.

Below is example Python code to draw the sample:

params = [a1, a2, ..., ak]

xs = [random.betavariate(params[0], sum(params[1:]))]

for j in range(1,len(params)-1):

    phi = random.betavariate(params[j], sum(params[j+1:]))    xs.append((1-sum(xs)) * phi)

xs.append(1-sum(xs))

Intuitive interpretations of the parameters

The concentration parameter

Dirichlet distributions are very often used as prior distributions in Bayesian inference. The simplest and perhaps most common type of Dirichlet prior is the symmetric Dirichlet distribution, where all parameters are equal. This corresponds to the case where you have no prior information to favor one component over any other. As described above, the single value α to which all parameters are set is called the concentration parameter. If the sample space of the Dirichlet distribution is interpreted as a discrete probability distribution, then intuitively the concentration parameter can be thought of as determining how "concentrated" the probability mass of a sample from a Dirichlet distribution is likely to be. With a value much less than 1, the mass will be highly concentrated in a few components, and all the rest will have almost no mass. With a value much greater than 1, the mass will be dispersed almost equally among all the components. See the article on the concentration parameter for further discussion.

String cutting

One example use of the Dirichlet distribution is if one wanted to cut strings (each of initial length 1.0) into K pieces with different lengths, where each piece had a designated average length, but allowing some variation in the relative sizes of the pieces. The α/α0 values specify the mean lengths of the cut pieces of string resulting from the distribution. The variance around this mean varies inversely with α0.

Pólya's urn

Consider an urn containing balls of K different colors. Initially, the urn contains α1 balls of color 1, α2 balls of color 2, and so on. Now perform N draws from the urn, where after each draw, the ball is placed back into the urn with an additional ball of the same color. In the limit as N approaches infinity, the proportions of different colored balls in the urn will be distributed as Dir(α1,...,αK).[19]

For a formal proof, note that the proportions of the different colored balls form a bounded [0,1]K-valued martingale, hence by the martingale convergence theorem, these proportions converge almost surely and in mean to a limiting random vector. To see that this limiting vector has the above Dirichlet distribution, check that all mixed moments agree.

Note that each draw from the urn modifies the probability of drawing a ball of any one color from the urn in the future. This modification diminishes with the number of draws, since the relative effect of adding a new ball to the urn diminishes as the urn accumulates increasing numbers of balls.

See also

  • Generalized Dirichlet distribution
  • Grouped Dirichlet distribution
  • Inverted Dirichlet distribution
  • Latent Dirichlet allocation
  • Dirichlet process
  • Matrix variate Dirichlet distribution

References

1. ^{{cite book|author1=S. Kotz |author2=N. Balakrishnan |author3=N. L. Johnson |title= Continuous Multivariate Distributions. Volume 1: Models and Applications|year=2000| publisher=Wiley|location= New York|isbn=978-0-471-18387-7|ref=harv}} (Chapter 49: Dirichlet and Inverted Dirichlet Distributions)
2. ^{{Cite journal |jstor = 2238036|title = Multivariate Beta Distributions and Independence Properties of the Wishart Distribution|journal = The Annals of Mathematical Statistics|volume = 35|issue = 1|pages = 261–269|last1 = Olkin|first1 = Ingram|last2 = Rubin|first2 = Herman|year = 1964}}
3. ^{{cite web|url=https://www.ee.washington.edu/techsite/papers/documents/UWEETR-2010-0006.pdf |title=Introduction to the Dirichlet Distribution and Related Processes|year=2010|author1=Bela A. Frigyik |author2=Amol Kapila |author3=Maya R. Gupta |accessdate =May 2012|format= Technical Report UWEETR-2010-006|publisher= University of Washington Department of Electrical Engineering}}
4. ^Eq. (49.9) on page 488 of Kotz, Balakrishnan & Johnson (2000). Continuous Multivariate Distributions. Volume 1: Models and Applications. New York: Wiley.
5. ^{{cite book|author=BalakrishV. B.| year=2005 |title=A Primer on Statistical Distributions|publisher=John Wiley & Sons, Inc.|location=Hoboken, NJ|isbn = 978-0-471-42798-8 | chapter="Chapter 27. Dirichlet Distribution" |page=274}}
6. ^{{cite web|last1=Hoffmann|first1=Till|title=Moments of the Dirichlet distribution|url=https://tillahoffmann.github.io/Moments-of-the-Dirichlet-distribution/|accessdate=13 September 2014}}
7. ^{{cite book|author=Christopher M. Bishop|title=Pattern Recognition and Machine Learning|url=https://books.google.com/books?id=kTNoQgAACAAJ|date=17 August 2006|publisher=Springer|isbn=978-0-387-31073-2}}
8. ^{{cite web|last=Farrow|first=Malcolm|title=MAS3301 Bayesian Statistics|url=http://www.mas.ncl.ac.uk/~nmf16/teaching/mas3301/week6.pdf|work=Newcastle University|publisher=Newcastle University|accessdate=10 April 2013}}
9. ^{{cite book |last1=Lin |first1=Jiayu |title=On The Dirichlet Distribution |date=2016 |publisher=Queen's University |location=Kingston, Canada |pages=§ 2.4.9 |url=https://mast.queensu.ca/~communications/Papers/msc-jiayu-lin.pdf}}
10. ^{{cite journal | journal=Journal of Statistical Planning and Inference | volume=93 | issue=325 | pages=51–69 | year=2001 | author=Song, Kai-Sheng | title=Rényi information, loglikelihood, and an intrinsic distribution measure| pmid= | doi = 10.1016/S0378-3758(00)00169-5 | jstor= | publisher=Elsevier}}
11. ^{{cite journal | journal=Journal of the American Statistical Association | volume=64 | issue=325 | pages=194–206 | year=1969 | author=Connor, Robert J. | title=Concepts of Independence for Proportions with a Generalization of the Dirichlet Distribution | pmid= | doi = 10.2307/2283728 | jstor=2283728 | author2=Mosimann, James E | publisher=American Statistical Association }}
12. ^See Kotz, Balakrishnan & Johnson (2000), Section 8.5, "Connor and Mosimann's Generalization", pp. 519–521.
13. ^P. C. B. Phillips 1988. "The characteristic function of the Dirichlet and multivariate F distribution", Cowles Foundation discussion paper 985
14. ^{{cite journal | last1=Grinshpan | first1=A. Z. | title=An inequality for multiple convolutions with respect to Dirichlet probability measure | doi=10.1016/j.aam.2016.08.001 | year=2017 | journal=Advances in Applied Mathematics | volume=82 | issue=1 | pages=102–119 }}
15. ^{{cite book |publisher=Springer-Verlag |year=1986 |last=Devroye |first=Luc |url=http://luc.devroye.org/rnbookindex.html |title=Non-Uniform Random Variate Generation |ref=harv |isbn=0-387-96305-7}}
16. ^Lefkimmiatis et al., 2009  . Bayesian Inference on Multiscale Models for Poisson Intensity Estimation: Applications to Photon-Limited Image Denoising. IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 18, NO. 8, AUGUST 2009
17. ^Andreoli, Jean-Marc, 2018 [https://arxiv.org/abs/1811.05266]. A conjugate prior for the Dirichlet distribution. Arxiv 1811.05266
18. ^{{cite book |author1=A. Gelman |author2=J. B. Carlin |author3=H. S. Stern |author4=D. B. Rubin | year=2003 | title= Bayesian Data Analysis | edition=2nd | isbn=1-58488-388-X | pages=582}}
19. ^{{cite journal | journal=Ann. Stat. | volume=1 | issue=2 | pages=353–355 | year=1973 | author=Blackwell, David | title=Ferguson distributions via Polya urn schemes | pmid= | doi = 10.1214/aos/1176342372 | last2=MacQueen | first2=James B. }}

External links

  • {{springer|title=Dirichlet distribution|id=p/d032840}}
  • Dirichlet Distribution
  • How to estimate the parameters of the compound Dirichlet distribution (Pólya distribution) using expectation-maximization (EM)
  • {{cite web|url=http://luc.devroye.org/rnbookindex.html |title=Non-Uniform Random Variate Generation|author= Luc Devroye|accessdate=May 2012|ref=harv}}
  • Dirichlet Random Measures, Method of Construction via Compound Poisson Random Variables, and Exchangeability Properties of the resulting Gamma Distribution
  • [https://cran.r-project.org/web/packages/SciencesPo/index.html SciencesPo]: R package that contains functions for simulating parameters of the Dirichlet distribution.
{{ProbDistributions|multivariate}}

4 : Multivariate continuous distributions|Conjugate prior distributions|Exponential family distributions|Continuous distributions

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 9:15:56