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 grad_trace_a_inv_dot_covars(self, chol_a, k, j): a_inv = util.inv_chol(chol_a) return np.diagonal(a_inv) * self.covars[k, j, :].flatten()
def tr_AinvS(self, L, k, j): return np.dot(np.diagonal(inv_chol(L)), self.s[k, j, :])
def dAinvS_dS(self, L, k, j): return np.diagonal(inv_chol(L)) * self.s[k, j, :].flatten()