def _pull_from_cache_or_compute(self):
if self.caching and len(self._cache_list) == self.num_states:
chol = self._cache_list[self.state]['chol']
alpha = self._cache_list[self.state]['alpha']
else:
chol = spla.cholesky(self.kernel.cov(self.inputs), lower=True)
alpha = spla.cho_solve((chol, True), self.values - self.mean.value)
return chol, alpha
评论列表
文章目录