在EM算法的方法,我们用Jensen不等式在到达
我读过EM的所有内容都只能解决这个问题,但是我一直对不了解EM算法为何自然产生的解释感到不安。我了解到可能性通常是用来处理加法而不是乘法,但是定义中的出现对我来说没有动力。为什么要考虑\ log而不考虑其他单调函数?由于种种原因,我怀疑期望最大化背后的“含义”或“动机”在信息论和足够的统计方面有某种解释。如果有这样的解释,那将不仅仅是抽象算法而已。
在EM算法的方法,我们用Jensen不等式在到达
我读过EM的所有内容都只能解决这个问题,但是我一直对不了解EM算法为何自然产生的解释感到不安。我了解到可能性通常是用来处理加法而不是乘法,但是定义中的出现对我来说没有动力。为什么要考虑\ log而不考虑其他单调函数?由于种种原因,我怀疑期望最大化背后的“含义”或“动机”在信息论和足够的统计方面有某种解释。如果有这样的解释,那将不仅仅是抽象算法而已。
Answers:
EM算法具有不同的解释,并且可以在不同的应用程序中以不同的形式出现。
这一切都始于似然函数或等效地,我们想最大化的对数似然函数。(我们通常使用对数来简化计算:严格为单调,凹面,并且。)在理想情况下,的值仅取决于模型参数 ,因此我们可以搜索的空间并找到一个最大化的。
但是,在许多有趣的现实世界应用程序中,事情变得更加复杂,因为并非观察到所有变量。是的,我们可能直接观察,但未观察到其他一些变量。由于缺少变量 ,我们处于一种“鸡与蛋”的情况:没有我们就无法估计参数,没有我们就无法推断的值。
这就是EM算法发挥作用的地方。我们从模型参数的初始猜测开始,并得出缺失变量的期望值(即,E步)。当我们拥有的值时,我们可以使参数的似然性最大化(即M阶,对应于问题陈述中的方程)。有了这个我们可以得出的新期望值(另一个E步),依此类推。换句话说,在每个步骤中,我们都假设和,是众所周知的。我们重复此迭代过程,直到不再增加可能性为止。
简而言之,这是EM算法。众所周知,在此迭代EM过程中,可能性永远不会降低。但是请记住,EM算法不能保证全局最优。也就是说,它可能以似然函数的局部最优结束。
出现在θ (k + 1 )方程中的是不可避免的,因为在这里要最大化的函数写为log似然。
可能性与对数可能性
正如已经说过的那样,以最大的可能性引入对仅是因为通常优化总和比乘积容易。我们不考虑其他单调函数的原因是,对数是具有将乘积转化为和的性质的唯一函数。
激发对数的另一种方法是:代替最大化模型下数据的概率,我们可以等效地尝试最小化数据分布p data(x )和模型分布p之间的Kullback-Leibler差异。(X | θ ),
右侧的第一项在参数中是恒定的。如果我们有来自数据分布(我们的数据点)的样本,我们可以用数据的平均对数似然来近似第二项,
EM的替代观点
我不确定这是否是您要寻找的解释,但是我发现以下期望最大化的观点比通过詹森不等式的动机更具启发性(您可以在Neal&Hinton(1998)中找到详细的描述)或克里斯·毕晓普(Chris Bishop)的PRML书中的第9.3章)。
不难证明
for any . If we call the first term on the right-hand side , this implies that
Because the KL divergence is always positive, is a lower bound on the log-likelihood for every fixed . Now, EM can be viewed as alternately maximizing with respect to and . In particular, by setting in the E-step, we minimize the KL divergence on the right-hand side and thus maximize .
The paper that I found clarifying with respect to expectation-maximization is Bayesian K-Means as a "Maximization-Expectation" Algorithm (pdf) by Welling and Kurihara.
Suppose we have a probabilistic model with observations, hidden random variables, and a total of parameters. We are given a dataset and are forced (by higher powers) to establish .
1. Gibbs sampling
We can approximate by sampling. Gibbs sampling gives by alternating:
2. Variational Bayes
Instead, we can try to establish a distribution and and minimize the difference with the distribution we are after . The difference between distributions has a convenient fancy name, the KL-divergence. To minimize we update:
3. Expectation-Maximization
To come up with full-fledged probability distributions for both and might be considered extreme. Why don't we instead consider a point estimate for one of these and keep the other nice and nuanced. In EM the parameter is established as the one being unworthy of a full distribution, and set to its MAP (Maximum A Posteriori) value, .
Here would actually be a better notation: the argmax operator can return multiple values. But let's not nitpick. Compared to variational Bayes you see that correcting for the by doesn't change the result, so that is not necessary anymore.
4. Maximization-Expectation
There is no reason to treat as a spoiled child. We can just as well use point estimates for our hidden variables and give the parameters the luxury of a full distribution.
If our hidden variables are indicator variables, we suddenly have a computationally cheap method to perform inference on the number of clusters. This is in other words: model selection (or automatic relevance detection or imagine another fancy name).
5. Iterated conditional modes
Of course, the poster child of approximate inference is to use point estimates for both the parameters as well as the observations .
To see how Maximization-Expectation plays out I highly recommend the article. In my opinion, the strength of this article is however not the application to a -means alternative, but this lucid and concise exposition of approximation.
There is a useful optimisation technique underlying the EM algorithm. However, it's usually expressed in the language of probability theory so it's hard to see that at the core is a method that has nothing to do with probability and expectation.
Consider the problem of maximising
Now suppose that the play well together in the sense that linear combinations of them give you something easy to optimise. For example, if all of the are quadratic in then a linear combination of the will also be quadratic, and hence easy to optimise.
Given this supposition, it'd be cool if, in order to optimise we could somehow shuffle the past the so it could meet the s and eliminate them. Then the could play together. But we can't do that.
Let's do the next best thing. We'll make another function that is similar to . And we'll make it out of linear combinations of the .
Let's say is a guess for an optimal value. We'd like to improve this. Let's find another function that matches and its derivative at , i.e. and . If you plot a graph of in a small neighbourhood of it's going to look similar to .
You can show that
So starting with , we form and optimise that. Because it's similar to in the neighbourhood of we hope the optimum of is similar to the optimum of g. Once you have a new estimate, construct the next and repeat.
I hope this has motivated the choice of . This is exactly the procedure that takes place in EM.
But there's one more important point. Using Jensen's inequality you can show that . This means that when you optimise you always get an that makes bigger compared to . So even though was motivated by its local similarity to , it's safe to globally maximise at each iteration. The hope I mentioned above isn't required.
This also gives a clue to when to use EM: when linear combinations of the arguments to the function are easier to optimise. For example when they're quadratic - as happens when working with mixtures of Gaussians. This is particularly relevant to statistics where many of the standard distributions are from exponential families.
As you said, I will not go into technical details. There are quite a few very nice tutorials. One of my favourites are Andrew Ng's lecture notes. Take a look also at the references here.
EM is naturally motivated in mixture models and models with hidden factors in general. Take for example the case of Gaussian mixture models (GMM). Here we model the density of the observations as a weighted sum of gaussians:
The point is not using monotonic functions but convex functions. And the reason is the Jensen's inequality which ensures that the estimates of the EM algorithm will improve at every step.