code: def _calc_var(self):
      if self.data is None:
          raise RuntimeError("Fit the data model first.")
  
      data = self.data.T
  
      # variance calc
      var = np.nanvar(data, axis=1)
      total_var = var.sum()
      self.var_exp = self.eig_vals.cumsum() / total_var
  
file_path: hypertools/hypertools/_externals/ppca.py
imports: import os
  import numpy
  from scipy.linalg import orth
label_desc: Use image node_id 5 for calling the PPCA obj's underlying member method code with example usage: obj._calc_var() without return types