Laplace Glättung und Dirichlet vor

11

In dem Wikipedia-Artikel über Laplace-Glättung (oder additive Glättung) heißt es aus Bayes-Sicht:

Dies entspricht dem erwarteten Wert der posterioren Verteilung unter Verwendung einer symmetrischen Dirichlet-Verteilung mit dem Parameter als Prior.α

Ich bin verwirrt darüber, wie das tatsächlich stimmt. Könnte mir jemand helfen zu verstehen, wie diese beiden Dinge gleichwertig sind?

Vielen Dank!

DanielX2010
quelle

Antworten:

10

Sicher. Dies ist im Wesentlichen die Beobachtung, dass die Dirichlet-Verteilung ein konjugiertes Prior ist der Multinomialverteilung ist. Dies bedeutet, dass sie die gleiche funktionale Form haben. Der Artikel erwähnt es, aber ich möchte nur betonen, dass dies aus dem multinomialen Stichprobenmodell folgt. Also, los geht's ...

Bei der Beobachtung geht es um den posterioren Bereich. Lassen Sie uns also einige Daten einführen , bei denen es sich um K verschiedene Elemente handelt. Wir beobachten insgesamt N = K i = 1 x i Proben. Wir nehmen an, dass x aus einer unbekannten Verteilung π gezogen wird (auf die wir ein D i r ( α ) vor das K setzenxKN=i=1KxixπDir(α)K Implex setzen).

Die hintere Wahrscheinlichkeit von bei α und Daten x istπαx

p(π|x,α)=p(x|π)p(π|α)

Die Wahrscheinlichkeit ist die Multinomialverteilung. Schreiben wir nun die PDFs aus:p(x|π)

p(x|π)=N!x1!xk!π1x1πkxk

und

p(π|α)=1B(α)i=1Kπiα1

wobei . Multiplizieren, das finden wir,B(α)=Γ(α)KΓ(Kα)

p(π|α,x)=p(x|π)p(π|α)i=1Kπixi+α1.

Mit anderen Worten, der hintere ist auch Dirichlet. Die Frage betraf den hinteren Mittelwert. Da der hintere Dirichlet ist, können wir die Formel für den Mittelwert eines Dirichlets anwenden , um dies zu finden:

E[πi|α,x]=xi+αN+Kα.

Hoffe das hilft!

ja
quelle
p(π|α,x)=p(x|π)p(π|α)/p(x|α),p(π|α,x)=p(x|π)p(π|α)?π, but writing an equality is not true I think.
michal
I was confused about this for a long time, and I want to share my realization. These folks motivating Laplace smoothing by Dirichlet are using the Posterior Mean, not the MAP. For simplicity, assume the Beta distribution (simplest case of Dirichlet) The posterior mean is α+nsuccessα+β+nsuccess+nfailures whereas the MAP is α+nsuccess1α+β+nsuccess+nfailures2. So if someone says α=β=1 corresponds to adding 1 to numerator and 2 to denominator, it's because they are using the Posterior Mean.
RMurphy
0

As a side note, I would also like to add another point to the above derivation, which it's not really concerning the main question. However, talking about Dirichlet priors on multinomial distribution, I thought it worth to mention that what would be the form of likelihood function if we're going to take probabilities as nuisance variables.

As it's correctly pointed out by by sydeulissie, the p(π|α,x) is proportional to i=1Kπixi+α1 . Now here I would like to calculate p(x|α).

p(x|α)=i=1Kp(x|πi,α)p(π|α)dπ1dπ2...dπK

Using an integral identity for gamma functions, we have:

p(x|α)=Γ(Kα)Γ(N+Kα)i=1KΓ(xi+α)Γ(α)

The above derivation of the likelihood for categorical data proposes a more robust way of dealing with this data for cases that the sample size N is not so big enough.

omidi
quelle