From a71624867610c09fc9c76072faf4bc3abb20fdfa Mon Sep 17 00:00:00 2001 From: txingml Date: Sat, 10 Mar 2018 17:29:20 +0800 Subject: [PATCH] fix linRegVb and rvmRegVb --- chapter10/linRegVb.m | 2 +- chapter10/rvmRegVb.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter10/linRegVb.m b/chapter10/linRegVb.m index e3fe01f..0017e31 100644 --- a/chapter10/linRegVb.m +++ b/chapter10/linRegVb.m @@ -53,7 +53,7 @@ KLalpha = -a*log(b); % q(beta) e2 = sum((t-Ew'*X).^2); - invUX = U\X; + invUX = U'\X; trXSX = dot(invUX(:),invUX(:)); d = d0+0.5*(e2+trXSX); Ebeta = c/d; diff --git a/chapter10/rvmRegVb.m b/chapter10/rvmRegVb.m index 4616cba..2430662 100644 --- a/chapter10/rvmRegVb.m +++ b/chapter10/rvmRegVb.m @@ -56,7 +56,7 @@ KLalpha = -sum(a*log(b)); % q(beta) e2 = sum((t-Ew'*X).^2); - invUX = U\X; + invUX = U'\X; trXSX = dot(invUX(:),invUX(:)); d = d0+0.5*(e2+trXSX); Ebeta = c/d;