def _update_inverses(self): """ Calculates and stores kernel, and its inverses. """ for j in range(self.num_latent_proc): self.Kzz[j, :, :] = self.kernels_latent[j].K(self.Z[j, :, :]) self.chol[j, :, :] = jitchol(self.Kzz[j, :, :]) self.invZ[j, :, :] = inv_chol(self.chol[j, :, :]) self.log_detZ[j] = pddet(self.chol[j, :, :]) self.hypers_changed = False self.inducing_changed = False
def log_normal(self): log_normal = -0.5 * ( self.num_latent * self.num_dim * np.log(2 * np.pi) + np.log(2)) for i in xrange(self.num_latent): log_normal -= 0.5 * util.pddet(self.covars_cholesky[i]) return log_normal.astype(np.float32)
def log_pdf(self, j, k, l): return -((self.s[0, j, :, :].shape[0])/2) * (math.log(2 * math.pi) + math.log(2.0)) - \ 0.5 * pddet(self.L[0,j,:])
def log_normal(self): log_normal = -0.5 * (self.num_latent * self.num_dim * np.log(2 * np.pi) + np.log(2)) for i in xrange(self.num_latent): log_normal -= 0.5 * util.pddet(self.covars_cholesky[i]) return log_normal.astype(np.float32)