(self)
return cholesky, alpha
Compute cache.
Compute cache.
Compute cache .
def _compute_cache(self):
        """Compute cache."""
        # Scaled kernel
        identity = tf.eye(tf.shape(self.X)[0], dtype=config.dtype)
        kernel = self.kern.K(self.X) + identity * self.likelihood.variance
        kernel *= (self._scale ** 2)

        # Scaled target
        target = self._scale * (self.Y - self.mean_function(self.X))

        # Cholesky decomposition
        cholesky = tf.cholesky(kernel, name='gp_cholesky')
        alpha = tf.matrix_triangular_solve(cholesky, target, name='gp_alpha')

        return cholesky, alpha
def _compute_cache ( self ) : # Scaled kernel identity = tf . eye ( tf . shape ( self . X ) [ 0 ] , dtype = config . dtype ) kernel = self . kern . K ( self . X ) + identity * self . likelihood . variance kernel *= ( self . _scale ** 2 ) # Scaled target target = self . _scale * ( self . Y - self . mean_function ( self . X ) ) # Cholesky decomposition cholesky = tf . cholesky ( kernel , name = 'gp_cholesky' ) alpha = tf . matrix_triangular_solve ( cholesky , target , name = 'gp_alpha' ) return cholesky , alpha