class_docstr: Representation of a positive semidefinite matrix in factored form.
  
  The representation is constructed based on a vector `diag` and
  rectangular matrix `root`, such that the PSD matrix represented by
  the class instance is Diag + root * root', where Diag is the
  square diagonal matrix with `diag` on its main diagonal.
  
  Parameters
  ----------
  diag : 1d array_like
      See above
  root : 2d array_like
      See above
  
  Notes
  -----
  The matrix is represented internally in the form Diag^{1/2}(I +
  factor * scales * factor')Diag^{1/2}, where `Diag` and `scales`
  are diagonal matrices, and `factor` is an orthogonal matrix.
docstr: Decorrelate the columns of `rhs`.
  
  Parameters
  ----------
  rhs : array_like
      A 2 dimensional array with the same number of rows as the
      PSD matrix represented by the class instance.
  
  Returns
  -------
  C^{-1/2} * rhs, where C is the covariance matrix represented
  by this class instance.
  
  Notes
  -----
  The returned matrix has the identity matrix as its row-wise
  population covariance matrix.
  
  This function exploits the factor structure for efficiency.
docstr_tok: ["Decorrelate","the","columns","of","`","rhs","`",".","Parameters","--","--","--","--","--","rhs",":","array_like","A","2","dimensional","array","with","the","same","number","of","rows","as","the","PSD","matrix","represented","by","the","class","instance",".","Returns","--","--","--","-","C^","{","-1\/2","}","*","rhs",",","where","C","is","the","covariance","matrix","represented","by","this","class","instance",".","Notes","--","--","-","The","returned","matrix","has","the","identity","matrix","as","its","row-wise","population","covariance","matrix",".","This","function","exploits","the","factor","structure","for","efficiency","."]
code: def decorrelate(self, rhs):
      """
      Decorrelate the columns of `rhs`.
  
      Parameters
      ----------
      rhs : array_like
          A 2 dimensional array with the same number of rows as the
          PSD matrix represented by the class instance.
  
      Returns
      -------
      C^{-1/2} * rhs, where C is the covariance matrix represented
      by this class instance.
  
      Notes
      -----
      The returned matrix has the identity matrix as its row-wise
      population covariance matrix.
  
      This function exploits the factor structure for efficiency.
      """
  
      # I + factor * qval * factor' is the inverse square root of
      # the covariance matrix in the homogeneous case where diag =
      # 1.
      qval = -1 + 1 / np.sqrt(1 + self.scales)
  
      # Decorrelate in the general case.
      rhs = rhs / np.sqrt(self.diag)[:, None]
      rhs1 = np.dot(self.factor.T, rhs)
      rhs1 *= qval[:, None]
      rhs1 = np.dot(self.factor, rhs1)
      rhs += rhs1
  
      return rhs
  
imports: import numpy
  import scipy.sparse
  from scipy.sparse.linalg import svds
  from scipy.optimize import fminbound
  import warnings
  from statsmodels.tools.tools import Bunch
  from statsmodels.tools.sm_exceptions import IterationLimitWarning, iteration_limit_doc
label_desc: Use image node_id 3 for calling the FactoredPSDMatrix obj's underlying member method code with example usage: obj.decorrelate(rhs) and returns: rhs