cholesky update for RA

This commit is contained in:
James Hensman 2013-05-03 14:00:22 +01:00
parent 7561c4c232
commit d9252d0e36
3 changed files with 35 additions and 2 deletions

View file

@ -9,6 +9,11 @@ from .. import kern
from GP import GP
from scipy import linalg
def backsub_both_sides(L,X):
""" Return L^-T * X * L^-1, assumuing X is symmetrical and L is lower cholesky"""
tmp,_ = linalg.lapack.flapack.dtrtrs(L,np.asfortranarray(X),lower=1,trans=1)
return linalg.lapack.flapack.dtrtrs(L,np.asfortranarray(tmp.T),lower=1,trans=1)[0].T
class sparse_GP(GP):
"""
Variational sparse GP model