efficient handling of Y and YYT

This commit is contained in:
Nicolo Fusi 2013-02-15 13:54:01 +00:00
parent cc158d64a9
commit eddb677446
2 changed files with 9 additions and 6 deletions

View file

@ -49,6 +49,9 @@ class sparse_GP(GP):
self.has_uncertain_inputs=True
self.X_uncertainty = X_uncertainty
if not self.likelihood.is_heteroscedastic:
self.likelihood.trYYT = np.trace(np.dot(self.likelihood.Y, self.likelihood.Y.T)) # TODO: something more elegant here?
GP.__init__(self, X, likelihood, kernel=kernel, normalize_X=normalize_X, Xslices=Xslices)
#normalise X uncertainty also