From 30a20b5bda3c080e6ffb2f042a33a5346f97a6c5 Mon Sep 17 00:00:00 2001 From: ST John Date: Wed, 30 Mar 2022 10:21:06 +0300 Subject: [PATCH] revert change that is separated into #239 --- src/sparse_approximations.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sparse_approximations.jl b/src/sparse_approximations.jl index 202e6821..984132a4 100644 --- a/src/sparse_approximations.jl +++ b/src/sparse_approximations.jl @@ -51,7 +51,7 @@ Intelligence and Statistics. 2009. function posterior(vfe::VFE, fx::FiniteGP, y::AbstractVector{<:Real}) @assert vfe.fz.f === fx.f - U_y = _cholesky(fx.Σy).U + U_y = _cholesky(_symmetric(fx.Σy)).U U = cholesky(_symmetric(cov(vfe.fz))).U B_εf = U' \ (U_y' \ cov(fx, vfe.fz))' @@ -85,7 +85,7 @@ function update_posterior( U = f_post_approx.data.U z = inducing_points(f_post_approx) - U_y₂ = _cholesky(fx.Σy).U + U_y₂ = _cholesky(_symmetric(fx.Σy)).U temp = zeros(size(f_post_approx.data.Σy, 1), size(fx.Σy, 2)) Σy = [f_post_approx.data.Σy temp; temp' fx.Σy] @@ -136,7 +136,7 @@ function update_posterior(f_post_approx::ApproxPosteriorGP{<:VFE}, fz::FiniteGP) Cu1f = cov(f_post_approx.prior, z_old, f_post_approx.data.x) Cu2f = cov(f_post_approx.prior, z, f_post_approx.data.x) - U_y = _cholesky(f_post_approx.data.Σy).U + U_y = _cholesky(_symmetric(f_post_approx.data.Σy)).U B_εf₂ = U22' \ (Cu2f * inv(U_y) - U12' * B_εf₁) B_εf = vcat(B_εf₁, B_εf₂)