EM算法概念
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算法概念的更多相关文章
- 简单理解EM算法Expectation Maximization
1.EM算法概念 EM 算法,全称 Expectation Maximization Algorithm.期望最大算法是一种迭代算法,用于含有隐变量(Hidden Variable)的概率参数模型的最 ...
- EM算法总结
EM算法总结 - The EM Algorithm EM是我一直想深入学习的算法之一,第一次听说是在NLP课中的HMM那一节,为了解决HMM的参数估计问题,使用了EM算法.在之后的MT中的词对齐中也用 ...
- 【EM算法】EM(转)
Jensen不等式 http://www.cnblogs.com/jerrylead/archive/2011/04/06/2006936.html 回顾优化理论中的一些概念.设f是定义域为实数的函数 ...
- 极大似然估计、贝叶斯估计、EM算法
参考文献:http://blog.csdn.net/zouxy09/article/details/8537620 极大似然估计 已知样本满足某种概率分布,但是其中具体的参数不清楚,极大似然估计估计就 ...
- EM算法原理
在聚类中我们经经常使用到EM算法(i.e. Estimation - Maximization)进行參数预计, 在该算法中我们通过函数的凹/凸性,在estimation和maximization两步中 ...
- 关于机器学习-EM算法新解
我希望自己能通俗地把它理解或者说明白,但是,EM这个问题感觉真的不太好用通俗的语言去说明白,因为它很简单,又很复杂.简单在于它的思想,简单在于其仅包含了两个步骤就能完成强大的功能,复杂在于它的数学推理 ...
- 猪猪的机器学习笔记(十四)EM算法
EM算法 作者:樱花猪 摘要: 本文为七月算法(julyedu.com)12月机器学习第十次次课在线笔记.EM算法全称为Expectation Maximization Algorithm,既最大 ...
- 从最大似然到EM算法浅解
从最大似然到EM算法浅解 zouxy09@qq.com http://blog.csdn.net/zouxy09 机器学习十大算法之中的一个:EM算法.能评得上十大之中的一个,让人听起来认为挺NB的. ...
- EM算法--第一篇
在统计计算中,最大期望(EM)算法是在概率(probabilistic)模型中寻找参数最大似然估计或者最大后验估计的算法,其中概率模型依赖于无法观测的隐藏变量(LatentVariable).最大期望 ...
随机推荐
- CSS渐变色边框,解决border设置渐变后,border-radius无效的问题
需求:用css设置渐变边框通过border-image来实现渐变色边框 <div class="content"></div> .content { wid ...
- codevs:1313 质因数分解:已知正整数 n是两个不同的质数的乘积,试求出较大的那个质数 。
#include<iostream>#include<cstdio>#include<cmath>using namespace std;int a[2];int ...
- TFRecord 使用
tfrecord生成 import os import xmltodict import tensorflow as tf import numpy as np dir_path = 'F:\数据存储 ...
- P1088 火星人——全排列函数
P1088 火星人 algorithm里面有一个next_permutation(a,a+n); #include<cstdio> #include<cstring> #inc ...
- Linux下DM无法显示建模界面的解决方法
方法来源: http://www.linuxhospital.com/read/unable-to-resolve-function-glxqueryextension-in-hyperview.ht ...
- html5表单重写
html5表单重写 一.总结 一句话总结: 表单重写用于在提交按钮上指定表单提交的各种信息,比如action <input type="submit" value=" ...
- arcgis python 获得arcgis的版本和安装路径
import arcpy # Use the dictionary iteritems to iterate through # the key/value pairs from GetInstall ...
- .net Core 中DateTime在Linux Docker中与Windows时间不一致
最近写了一个.net core项目,部署到CentOS并在docker上运行的时候,发现DateTime.Now获取的时间与Windows不一致(定时执行的任务,晚了8个小时),在Windows中可以 ...
- JVM 类加载器深入解析以及重要特性剖析
1.类加载流程图 从磁盘加载到销毁的完整过程. 2.类加载流程图2 1.加载: 就是把二进制形式的java类型读入java虚拟机中 2.连接: 验证.准备.解析. 连接就是将已经读入到内存的类的二进制 ...
- 小程序 跳转web-view 点击左上角返回需要点击2次才能返回
小程序 跳转web-view 点击左上角返回需要点击2次才能返回 再html页面引入js即可解决 <script type="text/javascript" src=& ...