From: <jpi...@us...> - 2012-06-08 18:43:15
|
Revision: 10604 http://octave.svn.sourceforge.net/octave/?rev=10604&view=rev Author: jpicarbajal Date: 2012-06-08 18:43:09 +0000 (Fri, 08 Jun 2012) Log Message: ----------- statistics: Adding explanation ofr the difference between the formulas in the book GPML and the one sin the function. Modified Paths: -------------- trunk/octave-forge/main/statistics/inst/regress_gp.m Modified: trunk/octave-forge/main/statistics/inst/regress_gp.m =================================================================== --- trunk/octave-forge/main/statistics/inst/regress_gp.m 2012-06-08 18:39:56 UTC (rev 10603) +++ trunk/octave-forge/main/statistics/inst/regress_gp.m 2012-06-08 18:43:09 UTC (rev 10604) @@ -46,6 +46,19 @@ x = [ones(1,size(x,1)); x']; + ## Juan Pablo Carbajal <car...@if...> + ## Note that in the book the equation (below 2.11) for the A reads + ## A = (1/sy^2)*x*x' + inv (Vp); + ## where sy is the scalar variance of the of the residuals (i.e y = x' * w + epsilon) + ## and epsilon is drawn from N(0,sy^2). Vp is the variance of the parameters w. + ## Note that + ## (sy^2 * A)^{-1} = (1/sy^2)*A^{-1} = (x*x' + sy^2 * inv(Vp))^{-1}; + ## and that the formula for the w mean is + ## (1/sy^2)*A^{-1}*x*y + ## Then one obtains + ## inv(x*x' + sy^2 * inv(Vp))*x*y + ## Looking at the formula bloew we see that Sp = (1/sy^2)*Vp + ## making the regression depend on only one parameter, Sp, and not two. A = x*x' + inv (Sp); K = inv (A); wm = K*x*y; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |