登录
首页 » Others » EM算法详细例子及推导

EM算法详细例子及推导

于 2020-12-07 发布
0 195
下载积分: 1 下载次数: 5

代码说明:

EM算法详细例子及推导数θ),那么对于上面的实验,我们可以计算出他们出现我们观察到的结果即0=(5,9,.8,4,7,20=(B,A,A,B,4)的概率函数P(X=x10),2z)⑨)就叫做θ的似然函数。我们将它对θ求偏导并令偏导数为0,就可以得到如的结果P(X=x0,=20))=(;P(z=A)3(1-P(z=A)2C10(1-64)10A(1-6C104(1-0(1-6B)C106n(1-6我们将这个问题稍微改变一下,我们将我们所观察到的结果修改一…下我们现在只知道每次试验有几次投掷出正面,但是不知道每次试验投掷的是哪个硬币,也就是说我们只知道表中第一列和第三列。这个时候我们就称Z为隐藏变量( Hidden variable),X称为观察变量( Observed variable)。这个时候再来估计参数θ4和θB,就没有那么多数据可供使用了,这个时侯的估计叫做不完整数据的参数估计。如果我们这个时候冇某种方法(比如,正确的猜到每次投掷硬币是A还是B),这样的话我们就可以将这个不完整的数据估计变为完整数据估计当然我们如果没有方法来获得更多的数据的话,那么下面提供了一种在这种不完整数据的情况下来估计参数θ的方法。我们用迭代的方式来进行:(1)我们先赋给θ一个初始值,这个值不管是经验也好猜的也好,反正我们给它一个初始值。在实际使用中往往这个初始值是有其他算法的结果给岀的,当然随机给他分配一个符合定义域的值也可以。这里我们就给定64=0.7,6B=0.4(2)然后我们根据这个来判断或者猜测每次投掷更像是哪枚硬币投掷的结果。比如对于试验1,如果投掷的是Δ,那么出现5个止面的概率为C10×0.75×(1-07)5≈0.1029:;如果投掷的是B,出现5个正面的概率为C105×0.43×(1-0.4)5≈0.2007;基于试验1的试验结果,可以判断这个试验投掷的是使币A的概率为0.10290.10290.2007)-0.389是B的概率为02007(0.1029+0.2007)06611。因此这个结果更可能是投掷B出现的结果(3)假设上一步猜测的结果为B,A,A,B,A,那么恨据这个猜测,可以像完整数据的参数仙计一样(公式2重新计算的值这样一次一次的迭代2-3步骤直到收敛,我们就得到了θ的估计。现在你可能有疑问,这个方法靠谱么?事实证明,它确实是靠谱的。期望最大化算法就是在这个想法上改进的。它在估计每次投掷的硬币的吋候,并不要确定住这次就是硬币A或者B,它计算岀来这次投掷的硬币是A的概率和是B的概率;然后在用这个概率(或者叫做Z的分布)来计算似然函数。期望最大化算法步骤总结如下:F步骤先利用旧的参数值〃计算隐藏变量Z的(条件)分布P(万=2|Xn2),然后计算logP(,X=m)的期望B(o(2,X=x)=∑∑P(Z=别X=)P(Z=X=x)其中θ是当前的值,而θ是上一次迭代得到的值。公式中已经只剩下θ一个变量了,θ是一个确定的值,这个公式或者函数常常叫做Q函数,用Q(6,6)来表示。M步骤极大化Q,往往这一步是求导,得到由旧的θ值′米计算新的θ值的公式aQ总结一下,期望最大化算法就是先根据参数初值估计隐藏变量的分布,然后根据隐藏变量的分布来计算观察变量的似然函数,估计参数的值。前者通常称为E步骤,后者称为M步骤3数学基础首先来明确一下我们的目标:我们的目标是在观察变量X和给定观察样本:1,x2,…,rn的情況下,极大化对数似然函数(=>nP(X2=x;)(5)其中只包含观察变量的概率密度函数P(X2=2)=∑P(X=n,=)这里因为参数θ的写法与条件概率的写法相同,因此将参数θ写到下标以更明确的表述其中Z为隐藏随机变量,{}是Z的所有可能的取值。那么6)=∑h∑P(X=x,z=2)∑h∑。Px=x这里我们引入了一组参数(不要怕多,我们后面会处理掉它的)a,它满足可能的;,0;∈(0,1和∑;a=1到这里,先介绍一个凸函数的性质,或者叫做凸函数的定义。∫(x)为凸函数,=1,2,…,m,A∈[0,1∑1A对∫(x)定义域中的任意n个m1,x2,…,xn有f(∑Aa)≤∑mf(xr)i=1对于严格凸函数,上面的等号只有在x1=2xn的时候成立。关于凸函数的其他性质不再赘述。对数函数是一个严格凸数。因而我们可以有下面这个结果0)=∑hn∑≥∑∑ah(X=2n,2=C现在我们根据等号成立的条件来确定a;即P(X=x,Z=2)C(10)其中c是一个与j无关的常数。因为∑,=1,稍作变换就可以得到P(X;=x;)现在来解释下我们得到了什么。c;就是Z=2;在X=x;下的条件概率戌者后验概率。求α就是求隐藏随机变量Z的条件分布。总结一下目前得到的公式就是)-∑∑P(Xi=i,Z(12)直接就极大值比较难求,EM算法就是按照下面这个过程来的。它就是大名鼎鼎的琴生( Jensen)不等式(1)根据上一步的θ来计算α,即隐藏变量的条件分布(2)极大化似然函数来得到当前的的估计3.1极大似然估计好吧,我觉得还是再说说极大似然估计吧。给定一个概率分布D,假设其概率密度函数为f,其中f带有一组参数6。为了估计这组参数6,我们可以从这个分布中抽出一个具有n个采样值的X1,X2,…,Yn,那么这个就是n个(假设独立)同分布随机变量,他们分别有取值x1,x2…,xn,那么我们就可以计算出出现这样一组观察值的概率密度为lI f(ai)(13)对于f是离散的情况,就计算出现这组观察值的概率10)注意,这个函数中是含有参数0的。0的极大似然估计就是求让上面似然函数取极大值的时候的参数O值。般来说,会将上面那个似然函数取自然对数,这样往往可以简化计算。记住,这样仅仅是为了简化计算。取了自然对数之后的函数叫做对数似然函数。ln()=∑lnf(n)因为对数是一个严格单调递增的凹函数,所以对似然函数取极人值与对对数似然函数取极大值是等价的。3取了对数之后还可以跟信息熵等概念联系起来4关于凸函数有很多种说法,上凸函数和下凸函数,凸函数和凹函数等等,这里指的是二阶导数大」(等」)0的一类函数,而凹函数是其相反数为凸数的一类函数32期望最大化算法收敛性如何保证算法收敛呢?我们只用证明l(04+1)≥1(00)就可以了l(0(t11)∑∑(+1)1PX=x;2=2)(+(t+1∑∑nf(X=x;,z=z;)(+1)(t)o(tn /(r=i,Z=2(t)≥∑∑ahn(t)7(0其中第一个人于等于号是因为只有当a取值合适(琴生不等式等号成立条件)的时候才有等号成立,第二个人于等于号正是M步骤的操作所致。这样我们就知道l(θ)是随着迭代次数的增加越来越人的,收敛条件是值不再变化或者变化幅度很小。4应用举例4.1参数估计很直接的应用就是参数估计,上面举的例子就是参数估计42聚类但是如果估计的参数可以表明类别的话,比如某个参数表示某个样本是否属于某个集合。这样的话其实聚类问题也就可以归结为参数估计问题。References[]最大似然估计[oNline].Availablehttp://zh.wikipediaorg/wiki.%E6%9c%80%E5%A4%A7%E4%BC%BC%E7%84%B6%E4%BC%B0%E8%AE%A1[2] Ceppellini, r, Siniscalco, M.& Smith, C.A. Ann. Hum. Genet. 20, 97-115(1955)3 Hartley, H. Biometrics 14, 174-194(1958)4 Baum, L.E., Petric, T, Soulcs, G.& Weiss, N. Ann. Math. Stat 41, 164-171(1970)[ 5] Dempster, A P, Laird, N.M., Rubin, D B.(1977). "Maximum Likelihoodfrom Incomplete Data via the em algorithm. Journal of the royal statis-tical Society Series B(Methodological)39(1): 1-38. JSTOR 2984875 MR0501537[6]Whatistheexpectationmaximizationalgorithm[oNline].Avaiable:http//ai. stanford. edu/-chuongdo/papers/em tutorial pdf[7TheEmAlgorithmOnline.Availablehttp://www.cnblogs.com,jerrylead/ archive/2011/04/06/2006936html

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • QtCharts绘制动态心电图
    动态心电图绘制,通过qt定时器,实现心电图从左往右进行绘制,到达坐标轴最大值后,再从左往右继续进行绘制。增加:文章地址:https://blog.csdn.net/DoleH/article/details/86250510
    2020-12-08下载
    积分:1
  • 离散小波变换的多分辨率分析
    关于小波变换的一个入门级的介绍,对刚开始学习小波变换很有帮助。
    2020-11-02下载
    积分:1
  • pads常用元件库
    pads的常用元件库,包括电阻,和常用IC,希望有帮助
    2020-12-02下载
    积分:1
  • OFDM频偏估计算法的仿真
    关于频偏估计算法的仿真,里面写的非常详细,算法的仿真过程,关于OFDM系统里频偏估计的算法
    2020-12-03下载
    积分:1
  • 基于MATLAB的BP神经网络应用(绝对好资源,超值10分)
    1 绪论 11.1 人工神经网络的研究背景和意义 11.2 神经网络的发展与研究现状 21.3 神经网络的研究内容和目前存在的问题 31.4 神经网络的应用 42 神经网络结构及BP神经网络 42.1 神经元与网络结构 42.2 BP神经网络及其原理 72.3 BP神经网络的主要功能 92.4 BP网络的优点以及局限性 93 BP神经网络在实例中的应用 103.1 基于MATLAB的BP神经网络工具箱函数 103.2 BP网络在函数逼近中的应用 123.3 BP网络在样本含量估计中的应用 174 结束语 23
    2020-12-01下载
    积分:1
  • 单相并网逆变器电流闭环控制MATLAB仿真
    单相并网逆变器电流闭环PI控制MATLAB仿真
    2020-11-28下载
    积分:1
  • 基于BP神经网络的简单字符识别算法自小结(C语言版)
    基于BP神经网络的简单字符识别算法自小结(C语言版)
    2020-12-04下载
    积分:1
  • LabVIEW数据采集实例
    数据采集适合于测试信号的采集与分析 该设计简单易学适合于初学者的选用
    2020-12-02下载
    积分:1
  • RTCM3.3协议全
    全新RTCM3.3协议完整版RTCM STANDARD 10403.3DIFFERENTIAL GNSS(GLOBAL NAVIGATION SATELLITE SYSTEMS)SERVICES – VERSION 3DEVELOPED BYRTCM SPECIAL COMMITTEE NO. 104OCTOBER 7, 2016COPYRIGHT©2016 RTCMRadio Technical Commission for Maritime Services1611 N. Kent St., Suite 605Arlington, Virginia 22209-214RTCM Paper 141-2016-SC104-STD000ocRTCMco00c30RTCM 10403. 3, Differential GNSS Global Navigation Satellite Systems)Services- Version 3, October 7, 2016This standard (referred to as version 3 has been developed by rtCm special Committee 104 as a moreefficient alternative to the standards entitled rtcm recommended standards for diffe rentialRecommended Standards for Differential gNss Global Navigation Satellite Systems Service, Version 2.x(Current version is 2. 3, now designated as RTCM 10402. 3. Service providers and vendors represented onthe SC104 Committee wanted a new standard that would be more efficient, easy to use, and more easilyadaptable to new situations. The main complaint was that the version 2. x parity scheme, which useswords with 24 bits of data followed by 6 bits of parity, was wasteful of bandwidth. Another complaint wasthat the parity was not independent from word to word. Still another was that even with so many bitsdevoted to parity the actual integrity of the message was not as high as it should be. Plus, 30-bit wordsare awkward to handle. the new standard version 3 is intended to correct these weaknessesUnlike Version 2. x, this standard does not include tentative messages The messages in Version 3 haveundergone testing for validity and interoperability and are considered to be permanent. amendments tothe standard may change the meaning of reserved bits or provide additional clarifying text, but no changeswill be made in the data fields. Changes will require new messages to be developed. In addition to themessages described in the current standard the committee continues to develop new messages whichare described in separately published amendments and periodically gathered into a new edition of thestandard. RTCM 10403x for dgNSS services is proving useful in supporting highly accurate differentialand kinematic positioning as well as a wide range of navigation applications worldwideNote that Version 3 messages are not compatible with Version 2. x. Since many receivers have beendesigned and programmed for use with Version 2. x messages, rtCm is maintaining both standards0402 3 and 10403, 3 as" standardsVersion 3.0The initial edition consisted primarily of messages designed to support real-time kinematic (RTK)operations. The reason for this emphasis is that rtk operation involves broadcasting a lot of informationand thus benefits the most from an efficient data format. Version 3.0 provided messages that supportGPS and gloNaSs rTK operations including code and carrier phase observables antenna parametersand ancillary system parametersVersion 3. 1(RTCM Standard 10403.1:The next edition, Version 3. 1 (RTCM Standard 10403. 1), incorporated GPS Network Corrections, whichenable a mobile receiver to obtain accurate rtk information valid over a large area. In addition, new GPSand GLoNaSS messages provide orbital parameters to assist in rapid acquisition a Unicode text messageis also provided for the transmission of textual data. Finally a set of messages are reserved for vendorswho want to encapsulate proprietary data in their broadcasts the gps Network Corrections enable amobile receiver to obtain accurate rtk information valid over a large area. the network rtk correctioninformation provided to a rover can be considered as interpolated corrections between the referencestations in the rtk network this interpolation is not perfect and varies with the actual conditions of theatmosphere. A residual interpolation error has to be expected. With sufficient redundancy in the RtKnetwork, the network server process can provide an estimate for residual interpolation errors. Suchquality estimates may be used by the rover to optimize the performance of rtk solutions The values maybe considered by the rover as a priori estimates only with sufficient tracking data available the rovermight be able to judge residual geometric and ionospheric errors itselfVersion 3. 1. Amendment 1:Amendments 1 was an extensive addition that adds rtcm messages containing transformation data andinformation about Coordinate reference Systems. For rtCm data supporting a rtk service, coordinatesare measured within the itrf or a regional realization surve yors and other users of rtk services mustnormally present their results in the coordinates of local datums. Therefore, coordinate transformationsare necessary. by having RTCM messages that contain transformation data and information about theCoordinate reference systems the users of the rtk service can obtain their results in the desired datumwithout any manual operations. the rtk service providers can then ensure that current information forthe computation of the transformations is always used. the convenience of this method will promote theacceptance of rtK servicesVersion 3. 1. amendment 2:Amendment 2 added residual error messages to support the use of Non-Physical or Computed referenceStations in a network rtk environmentVersion 3. 1. amendment 3:Amendment 3 addressed differences in the way gnss receiver manufacturers have implemented carrierphase encoding of some Version 3 messages so that carrier phase observations are in phase for all carrierphases of a specific frequency i e. they correct for quarter cycle phase shifts. others retain the quartercycle offset between the carrier phase observations in the data. this amendment documents the waydifferent manufacturers have handled the phase shift issue and prescribes a uniform approach for futureproducts.∨ersiⅰon3.1, Amendment4:Amendment 4 added sections 3.5.13 on glONASS Network rtK Correction Messages and 3.5. 14 on FKPNetwork Rtk Correction Messages Related revisions were also made elsewhere in the document.Version 3. 1. amendment 5Amendment 5 added section 3. 5. 12 on State Space Representation related revisions are also madeelsewhere in the document, along with some editorial correctionsVersion 3. 2(RTCM Standard 10403.2)Version 3.2 consolidates Version 3. 1 and all five amendments into a new edition, and it adds MultipleSignal Messages (MSM)as well. the Multiple Signal Message (MSm)format generates receiverobservables in the same way for all included satellite systems. the messages include compact and fullmessages for Pseudorange, PhaseRange, Carrier to Noise Ratio (standard and high resolution), andPhaseRangeratea table near the beginning of the standard lists which messages were included in each separate editionand amendment, so it should not be necessary for users to refer to older versions. Multiple signalMessages are a generic format that will be followed for all GNSs systems. version 3 originally consisted ofmessages for GPS and GLONASS, each in their own format Now with the imminent addition of signals forBeiDou, Galileo, and QZSS, as well as new signals provided by modernized GPS and GloNASS satellitesthe need for a consistent generic format became evident. service providers and users are urged to migrateto the MsM messages to make it easier to accommodate new gNss services(See The RTCM Multiple Signal Messages: A New Step in GNSS Data Standardization")Another newmessage is the gloNaSS Bias Information message. This message provides information which is intendedto compensate for the first-order inter-frequency phase range biases introduced by the reference receivercode- phase biasVersion 3.2, Amendment 1:Added Galileo F/NAv Satellite Ephemeris Data(msg. 1045 )and Bds MSM(msgs. 1121-1127)Version 3.2 amendment 2Added qzss ephemeris(msg. 1044 )and QZss MSm (msgs. 1111-1117Version 3. 3(RTCM Standard 10403.3)This new edition adds Satellite-Based Augmentation System Multiple Signal Messages to previouslydopted messages for GPS, GLONASS, Galileo, and QzssA new ephemeris message has been added for BeiDou(BDS)and a new I/NAV ephemeris message hasbeen added for Galileo. The new edition also reserves 100 messages be used exclusively by sc104 fornew message developmentFinally, the new edition makes consolidates previous amendments and makes numerous editorialImprovementsNavstar GPS Service, Version 2. x. Service providers and vendors represented on the scco000c30z1O2co00c30Contentsco00c30
    2020-06-27下载
    积分:1
  • MODTRAN介绍及使用PPT
    介绍了MODTRAN及常用大气辐射模型,并且讲解了tape5和PC版MODTRAN的使用方法及参数设置。
    2020-12-04下载
    积分:1
  • 696518资源总数
  • 105873会员总数
  • 12今日下载