def _update_cache(self):
        """
        INPUT:
        hyperparams:  dictionary
        OUTPUT: dictionary with the fields
        K:     kernel
        Kinv:  inverse of the kernel
        L:     chol(K)
        alpha: solve(K,y)
        W:     D*Kinv * alpha*alpha^T
        """
        cov_params_have_changed = self.covar.params_have_changed

        if cov_params_have_changed or self.Y_has_changed:
            K = self.covar.K()
            L = LA.cholesky(K).T# lower triangular
            Kinv = LA.cho_solve((L,True),SP.eye(L.shape[0]))
            alpha = LA.cho_solve((L,True),self.Y)
            W = self.t*Kinv - SP.dot(alpha,alpha.T)
            self._covar_cache = {}
            self._covar_cache['K'] = K
            self._covar_cache['Kinv'] = Kinv
            self._covar_cache['L'] = L
            self._covar_cache['alpha'] = alpha
            self._covar_cache['W'] = W

        return self._covar_cache
def _update_cache ( self ) : cov_params_have_changed = self . covar . params_have_changed if cov_params_have_changed or self . Y_has_changed : K = self . covar . K ( ) L = LA . cholesky ( K ) . T Kinv = LA . cho_solve ( ( L , True ) , SP . eye ( L . shape [ 0 ] ) ) alpha = LA . cho_solve ( ( L , True ) , self . Y ) W = self . t * Kinv - SP . dot ( alpha , alpha . T ) self . _covar_cache = { } self . _covar_cache [ 'K' ] = K self . _covar_cache [ 'Kinv' ] = Kinv self . _covar_cache [ 'L' ] = L self . _covar_cache [ 'alpha' ] = alpha self . _covar_cache [ 'W' ] = W return self . _covar_cache
INPUT:
        hyperparams:  dictionary
        OUTPUT: dictionary with the fields
        K:     kernel
        Kinv:  inverse of the kernel
        L:     chol(K)
        alpha: solve(K,y)
        W:     D*Kinv * alpha*alpha^T