首页 ex2

ex2

举报
开通vip

ex2 Bayesian Estimation of Time-Varying Processes Spring 2011 Exercise Round 2. Exercise 1. (Linear Bayesian Estimation) The priors for parameters a1 and a2 are independent Gaussian as follows: a1 ∼ N(0, σ 2) a2 ∼ N(0, σ 2), where the variance σ2 is known. T...

ex2
Bayesian Estimation of Time-Varying Processes Spring 2011 Exercise Round 2. Exercise 1. (Linear Bayesian Estimation) The priors for parameters a1 and a2 are independent Gaussian as follows: a1 ∼ N(0, σ 2) a2 ∼ N(0, σ 2), where the variance σ2 is known. The measurements yk are modeled as yk = a1 xk + a2 + ek, k = 1, . . . , n where ek’s are independent Gaussian error terms with mean 0 and variance 1, that is, ek ∼ N(0, 1). The values xk are fixed and known. The posterior distribution can be now written as p(a | y1, . . . , yn) = Z exp(− 1 2 n∑ k=1 (a1 xk+a2−yk) 2) exp(− 1 2σ2 a2 1 ) exp(− 1 2σ2 a2 2 ) where Z is the normalization term, which is independent of the parameter a = (a1 a2) T . The posterior distribution can be seen to be Gaussian and your task is to derive its mean and covariance. A) Write the exponent of the posterior distribution in matrix form as in Exercise 1 of Round 1 (in terms of y, X, a and σ2). B) Because Gaussian distribution is always symmetric, its mean m is at the max- imum of the distribution. Solve the mean by computing the gradient of the expo- nent and finding where it vanishes. C) Find the covariance of the distribution by computing the second derivative matrix (Hessian matrix) H of the exponent. The covariance is then Σ = −H−1 (why?). D) What is the resulting posterior distribution? What is the relationship with the LS-estimate in Exercise 1 of round 1? Bayesian Estimation of Time-Varying Processes Spring 2011 Exercise 2. (Linear Regression with Kalman Filter) The model in Exercise 1 can be written as a linear state space model as follows: ak = ak−1 yk = Hk ak + ǫk, where Hk = (xk 1), a0 ∼ N(0, σ2I) and ǫk ∼ N(0, 1). The state in the model is now ak = (a1,k a2,k)T and the measurements are yk for k = 1, . . . , n. Assume that Kalman filter is used for processing the measurements y1, . . . , yn. Your task is to prove that at time step n, the mean and covariance of an computed by the Kalman filter are the same as the mean and covariance of the posterior distribution computed in the previous exercise. The Kalman filter equations for the above model can be written as: Sk = Hk Pk−1H T k + 1 Kk = Pk−1 H T k S −1 k mk = mk−1 +Kk (yk −Hk mk−1) Pk = Pk−1 −Kk Sk K T k . A) Write formulas for the posterior mean mk−1 and covariance Pk−1 assuming that they are the same as what would be obtained if the pairs {(yi, xi) : i = 1, . . . , k − 1} were (batch) processed as in the previous exercise. Write similar equations for the mean mk and covariance Pk. Show that the posterior means can be expressed in form mk−1 = Pk−1 X T k−1 yk−1 mk = Pk X T k yk, where Xk−1 and yk−1 have been constructed as X and y in the previous exercise, except that only the pairs {(yi, xi) : i = 1, . . . , k − 1} have been used. Xk and yk have been constructed similarly from pairs up to step k. B) Rewrite the expressions XTk Xk and XTk yk in terms of Xk−1, yk−1, Hk and yk. Substitute these into the expressions of mk and Pk obtained in A). C) Expand the expression of the covariance Pk = Pk−1 −Kk Sk KTk by substi- tuting the expressions for Kk and Sk. Convert it to simpler form by applying the matrix inversion lemma: Pk−1 −Pk−1H T k (Hk Pk−1 H T k + 1) −1 Hk Pk−1 = (P −1 k−1 +H T k Hk) −1. Show that this expression for Pk is equivalent to the expression in A). Bayesian Estimation of Time-Varying Processes Spring 2011 D) Expand the expression of the mean mk = mk−1 + Kk (yk − Hk mk−1) and show that the result is equivalent to the expression obtained in A). Hint: The Kalman gain can also be written as Kk = Pk HTk . E) Prove by induction argument that the mean and covariance computed by the Kalman filter at step n is the same as the posterior mean and covariance obtained in the previous exercise. Exercise 3. (Gaussian Identities) Recall that the Gaussian probability density is defined as N(x |m,P) = 1 (2 π)n/2 |P|1/2 exp ( − 1 2 (x−m)T P−1 (x−m) ) Derive the following Gaussian identities: A) Let x and y have the Gaussian densities p(x) = N(x |m,P), p(y |x) = N(y |Hx,R), then the joint distribution of x and y is( x y ) ∼ N (( m Hm ) , ( P PHT HP HPHT +R )) and the marginal distribution of y is y ∼ N(Hm,HPHT +R). Hint: Use the properties of expectation E[Hx + r] = H E[x] + E[r] and Cov[Hx+ r] = H Cov[x]HT + Cov[r] (if x and r independent). B) Write down the explicit expression for the joint and marginal probability den- sities above: p(x,y) = p(y |x) p(x) =? p(y) = ∫ p(y |x) p(x) dx =? C) If the random variables x and y have the joint Gaussian probability density( x y ) ∼ N (( a b ) , ( A C CT B )) , then the conditional density of x given y is given as follows: x |y ∼ N(a+CB−1 (y − b),A−CB−1CT ) Hints: Bayesian Estimation of Time-Varying Processes Spring 2011 • Denote inverse covariance as D = [D11 D12;DT12 D22] and expand the quadratic form in the Gaussian exponent. • Compute the derivative with respect to x and set it to zero. Conclude that due to symmetry the point where the derivative vanishes is the mean. • Check from a linear algebra book that the inverse of D11 is given by the Schur complement: D−1 11 = A−CB−1 CT and that D12 can be then written as D12 = −D11 CB −1. • Find the simplified expression for the mean by applying the identities above. • Find the second derivative of the negative Gaussian exponent with respect to x. Conclude that it must be the inverse conditional covariance of x. • Use the Schur complement expression above for computing the conditional covariance.
本文档为【ex2】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_593325
暂无简介~
格式:pdf
大小:36KB
软件:PDF阅读器
页数:4
分类:互联网
上传时间:2013-11-28
浏览量:19