code: def approximate_eig(self, epsilon=1e-6):
          
          L = self.approximate_cholesky(epsilon=epsilon)
          LL = np.dot(L.T, L)
          s, V = np.linalg.eigh(LL)
          # sort
          s, V = sort_by_norm(s, V)
  
          # back-transform eigenvectors
          Linv = np.linalg.pinv(L.T)
          V = np.dot(Linv, V)
  
          # normalize eigenvectors
          ncol = V.shape[1]
          for i in range(ncol):
              if not np.allclose(V[:, i], 0):
                  V[:, i] /= np.sqrt(np.dot(V[:, i], V[:, i]))
  
          return s, V
docs: Compute low-rank approximation of the eigenvalue decomposition of target matrix.
  
          If spd is True, the decomposition will be conducted while ensuring that the spectrum of `A_k^{-1}` is positive.
  
          Parameters
          ----------
          epsilon : float, optional, default 1e-6
              Cutoff for eigenvalue norms. If negative eigenvalues occur, with norms larger than epsilon, the largest
              negative eigenvalue norm will be used instead of epsilon, i.e. a band including all negative eigenvalues
              will be cut off.
  
          Returns
          -------
          s : ndarray((m,), dtype=float)
              approximated eigenvalues. Number of eigenvalues returned is at most the number of columns used in the
              Nystroem approximation, but may be smaller depending on epsilon.
  
          W : ndarray((n,m), dtype=float)
              approximated eigenvectors in columns. Number of eigenvectors returned is at most the number of columns
              used in the Nystroem approximation, but may be smaller depending on epsilon.