http://liuxqsmile.blogbus.com/logs/17290002.html
高斯混合模型的期望最大化算法
本文大部分内容翻译自Answers.com的
Expectation-maximization algorithm 词条。
对 于一个不完整的样本集,假设y为观测(已知)数据,z为丢失数据,z和y构成了完整的数据。z可以为丢失的观测量,也可以是隐含的变量,如果这些变量已知 的话将会简化问题的求解。例如,在混合模型中,如果产生样本点的各个成分的分布为已知,则可以大大简化似然函数的计算。
假设p为完整数据的联合概率密度函数,该函数具有参数θ:

,它也可以看成是完整数据的似然函数(即样本集(y,z)具有θ分布函数的相似性),一个关于θ的函数。进一步,根据贝叶斯公式和全概率公式,丢失数据对于观测数据的条件分布为:

这个式子仅要求计算观测数据对于丢失数据的条件概率(似然函数)

和丢失数据的分布概率

。(分母仅为归一化需要)
EM算法通过迭代方法,构造更好的 θ
1,θ
2,... ,逐步优化初始的 θ
0, θ的递推优化公式通过下式得到:

Q(θ)是对数似然函数ln

的 期望。换句话说,我们不知道所有数据的值,所以我们不知道似然函数的准确值,但是对于给定的观测数据y,我们可以得到未知的z的概率分布,对于每一个丢失 的观测(z中的一个元素),都有一个关于θ的似然值,这样我们就可以计算似然函数的数学期望。这个期望显然受到θ的值的影响。