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. cube.js 学习(九)cube 的pre-aggregation

    我们可以使用cube的pre-aggregation 加速数据的查询,以下为一张来自官方的pre-aggregation 架构 参考架构图 pre-aggregation schema preAggr ...

  2. (2)Angular的开发

    什么是 ReactNative应用, 小程序与RN的关系 native端优化 Js端优化 ReactNative是? 用JavaScript来写App,性能好 异步编程 请点赞!因为你的鼓励是我写作的 ...

  3. 64位内核开发第十讲,IRQL中断级别了解

    目录 中断级别IROL了解 一丶IRQL 1.了解什么是中断 2.IROL中断级别. 3.遵守IROL编程规范的方式 中断级别IROL了解 一丶IRQL 1.了解什么是中断 中断就是产生的一个电信号. ...

  4. RHEL7下载

    RHEL7下载地址: http://mirrors.aliyun.com/centos/ 我的百度云盘地址: 链接:https://pan.baidu.com/s/1_-bm12bekFlWJiGHj ...

  5. 数据结构Java版之邻接表实现图(十)

    邻接表实现图,实际上是在一个数组里面存放链表,链表存放的是连接当前节点的其他节点. package mygraph; import java.util.ArrayList; import java.u ...

  6. 熔断机制hystrix

    一.问题产生 雪崩效应:是一种因服务提供者的不可用导致服务调用者的不可用,并将不可用逐渐放大的过程 正常情况下的服务: 某一服务出现异常,拖垮整个服务链路,消耗整个线程队列,造成服务不可用,资源耗尽: ...

  7. SQL查询练习题

    1.查询学生"百里守约"的基本信息 select * from students where name='百里守约' 2.查询学生百里守约"或"百里玄策&quo ...

  8. html5的 embed元素 和 object元素

    html5的 embed元素 和 object元素 一.总结 一句话总结: embed定义嵌入的内容,比如插件,比如flash object定义定义一个嵌入的对象,用于包含对象,比如图像.音频.视频. ...

  9. DELPHI控件升级

    DELPHI控件升级 1)DELPHI里面卸载旧版控件: 2)WINDOWS里面卸载旧版控件: 3)删除旧版控件所在安装文件夹: 4)删除旧版的DCU,DCP,BPL文件: 5)安装新版控件: 6)程 ...

  10. 如何提高工具开发和数据分析的效率?| jupyter | Rstudio server

    这部分是超级干货,也能直接体现一个开发分析者的能力. 主要分为两部分: 1. 面对新问题时,如何高效的分析和开发? 2. 面对相似的问题时,如何最快时间的利用之前的开发经验? 因为现在我主要用shel ...