EM算法是一种非常经典的alternative optimizing算法。alternative optimizing的思想就是对于一个最优化问题,可以计算分为两步或者参数分为两个,就可以随机任意的选择一个起始值或位置,固定一个参数A,以另一个参数B进行优化,然后固定参数B,以参数A进行优化,直到收敛未知。前面博文中所讲述的K-means也就这样的一个过程,或者meanshift均值漂移也是这样的一个思想。今天学习的一个算法也是这样一个概念。这里依然做一个入门级的概念理解指导,不做原理性的深入,后续等用到时在进行深入学习。参考维基百科。


In statistics, an expectation–maximization (EM) algorithm is an iterative method for finding maximum likelihood or maximum a posteriori (MAP) estimates of parameters in statistical models, where the model depends on unobserved latent variables. The EM iteration alternates between performing an expectation (E) step, which creates a function for the expectation of the log-likelihood evaluated using the current estimate for the parameters, and a maximization (M) step, which computes parameters maximizing the expected log-likelihood found on the E step. These parameter-estimates are then used to determine the distribution of the latent variables in the next E step.


上面讲述了EM算法的轮廓,EM算法是一个用来寻找model参数的最大似然估计或最大后验估计的迭代方法,而这个model依赖于没有观测的潜在变量。所以,EM算法采用alternative optimizing的思想,首先执行expectation 步,利用当前的参数构建最大似然函数(log),然后执行maximization 步,生成新的参数,就这样不断地交替计算优化迭代下去,直到收敛为止。


The EM algorithm is used to find (locally) maximum likelihood parameters of a statistical model in cases where the equations cannot be solved directly. Typically these models involve latent variables in addition to unknown parameters and known data observations. That is, either there are missing values among the data, or the model can be formulated more simply by assuming the existence of additional unobserved data points. For example, a mixture model can be described more simply by assuming that each observed data point has a corresponding unobserved data point, or latent variable, specifying the mixture component that each data point belongs to.

Finding a maximum likelihood solution typically requires taking the derivatives of the likelihood function with respect to all the unknown values — viz. the parameters and the latent variables — and simultaneously solving the resulting equations. In statistical models with latent variables, this usually is not possible. Instead, the result is typically a set of interlocking equations in which the solution to the parameters requires the values of the latent variables and vice versa, but substituting one set of equations into the other produces an unsolvable equation.

The EM algorithm proceeds from the observation that the following is a way to solve these two sets of equations numerically. One can simply pick arbitrary values for one of the two sets of unknowns, use them to estimate the second set, then use these new values to find a better estimate of the first set, and then keep alternating between the two until the resulting values both converge to fixed points. It’s not obvious that this will work at all, but in fact it can be proven that in this particular context it does, and that the derivative of the likelihood is (arbitrarily close to) zero at that point, which in turn means that the point is either a maximum or a saddle point.[12] In general there may be multiple maxima, and there is no guarantee that the global maximum will be found. Some likelihoods also have singularities in them, i.e. nonsensical maxima. For example, one of the “solutions” that may be found by EM in a mixture model involves setting one of the components to have zero variance and the mean parameter for the same component to be equal to one of the data points.


EM算法通常用来找到无法直接解决的(局部的)最大似然参数。在最优化问题求解时,一个参数的解需要另一个潜在的变量值,而这个潜在变量的值则需要那一个参数的解,就这样交织在一起。这个时候最好的办法就是alternative

optimizing。这里对应的是EM算法。


EM算法可以任意的选择两个set中的一个,并给定任意的值,利用它们去估计第二个,然后用这个新的值去估计找到一个更好的第一个set的值,就这样交替的执行,直到结果收敛到某些固定的点为止。这个流程并不一定能很好地工作,但是在一些特别的上下文中可以证明它是可行的。只是很多时候可能是局部最优或者是到了马鞍点。


2015-8-28 艺少

EM算法概念的更多相关文章

  1. 简单理解EM算法Expectation Maximization

    1.EM算法概念 EM 算法,全称 Expectation Maximization Algorithm.期望最大算法是一种迭代算法,用于含有隐变量(Hidden Variable)的概率参数模型的最 ...

  2. EM算法总结

    EM算法总结 - The EM Algorithm EM是我一直想深入学习的算法之一,第一次听说是在NLP课中的HMM那一节,为了解决HMM的参数估计问题,使用了EM算法.在之后的MT中的词对齐中也用 ...

  3. 【EM算法】EM(转)

    Jensen不等式 http://www.cnblogs.com/jerrylead/archive/2011/04/06/2006936.html 回顾优化理论中的一些概念.设f是定义域为实数的函数 ...

  4. 极大似然估计、贝叶斯估计、EM算法

    参考文献:http://blog.csdn.net/zouxy09/article/details/8537620 极大似然估计 已知样本满足某种概率分布,但是其中具体的参数不清楚,极大似然估计估计就 ...

  5. EM算法原理

    在聚类中我们经经常使用到EM算法(i.e. Estimation - Maximization)进行參数预计, 在该算法中我们通过函数的凹/凸性,在estimation和maximization两步中 ...

  6. 关于机器学习-EM算法新解

    我希望自己能通俗地把它理解或者说明白,但是,EM这个问题感觉真的不太好用通俗的语言去说明白,因为它很简单,又很复杂.简单在于它的思想,简单在于其仅包含了两个步骤就能完成强大的功能,复杂在于它的数学推理 ...

  7. 猪猪的机器学习笔记(十四)EM算法

    EM算法 作者:樱花猪   摘要: 本文为七月算法(julyedu.com)12月机器学习第十次次课在线笔记.EM算法全称为Expectation Maximization Algorithm,既最大 ...

  8. 从最大似然到EM算法浅解

    从最大似然到EM算法浅解 zouxy09@qq.com http://blog.csdn.net/zouxy09 机器学习十大算法之中的一个:EM算法.能评得上十大之中的一个,让人听起来认为挺NB的. ...

  9. EM算法--第一篇

    在统计计算中,最大期望(EM)算法是在概率(probabilistic)模型中寻找参数最大似然估计或者最大后验估计的算法,其中概率模型依赖于无法观测的隐藏变量(LatentVariable).最大期望 ...

随机推荐

  1. C++函数调用方式约定stdcall,cdecl,pascal,naked,thiscall,fastcall

    https://www.cnblogs.com/xiangtingshen/p/11014514.html C++函数调用约定_cdecl约定:参数:从右向左依次入栈堆栈平衡:调用方平衡 #inclu ...

  2. 【HTML】解析原理

    标准的web前端工程师需要知道 ◎浏览器(或者相应播放器)的渲染/重绘原理 这我得加把劲了.我还真的说的不是很清楚,我就G下,结果不是很多,找到了有一个,就记下来了... 以下部分来自handawei ...

  3. PHP中使用 Memcached 的测试案例

    <?php class MemcacheController extends ControllerBase { public function indexAction() { session_s ...

  4. #6085. 「美团 CodeM 资格赛」优惠券

    题目描述 用last[x]表示对x进行的上一次操作的位置,vis[x]表示x是否在大楼内. Splay维护'?'的位置. 若x要进楼: 1.若x已在楼内,则去找last[x]到i之间是否有'?',若有 ...

  5. 24、Checkpoint原理剖析

    一.原理 1.Checkpoint是什么 Checkpoint,是Spark提供的一个比较高级的功能. 有的时候,比如说,我们的Spark应用程序,特别的复杂,然后呢,从初始的RDD开始,到最后整个应 ...

  6. (31)Vue安装

    在使用Vue的时候,推荐安装Vue Devtools https://github.com/vuejs/vue-devtools#vue-devtools Browser devtools exten ...

  7. Django基础(2)-如何安装特定版本的Django项目

    Django1.0版本和2.0版本的差异较大,这里jacky更常用的Django的1.9.8的版本,本小节jacky将给大家分享如何用Pycharm创建1.9.8版本的项目 (一)使用Pycharm配 ...

  8. cat命令的简单实现

    cat命令的简单实现 目标:简单的实现cat命令 实现的mic_cat命令主要有三大功能 1.mic_cat命令一次显示整个文件 $ mic_cat filename 2.mic_cat命令从键盘创建 ...

  9. 深度学习面试题16:小卷积核级联卷积VS大卷积核卷积

    目录 感受野 多个小卷积核连续卷积和单个大卷积核卷积的作用相同 小卷积核的优势 参考资料 感受野 在卷积神经网络中,感受野(Receptive Field)的定义是卷积神经网络每一层输出的特征图(fe ...

  10. 用样式表美化QTabwidget外观

    没有仔细看是否正确,先保存到这里,以后研究一下 一.参考文章:http://bbs.csdn.net/topics/390632657?page=1 setStyleSheet("QTabW ...