class_docstr: Matrix normal version of RSA.
  
  The goal of this analysis is to find the covariance of the mapping from
  some design matrix X to the fMRI signal Y. It does so by marginalizing over
  the actual mapping (i.e. averaging over the uncertainty in it), which
  happens to correct a bias imposed by structure in the design matrix on the
  RSA estimate (see Cai et al., NIPS 2016).
  
  This implementation makes different choices about residual covariance
  relative to `brainiak.reprsimil.BRSA`: Here, the noise covariance is
  assumed to be kronecker-separable. Informally, this means that all voxels
  have the same temporal covariance, and all time points have the same
  spatial covariance. This is in contrast to BRSA, which allows different
  temporal covariance for each voxel. On the other hand, computational
  efficiencies enabled by this choice allow MNRSA to support a richer class
  of space and time covariances (anything in `brainiak.matnormal.covs`).
  
  For users: in general, if you are worried about voxels each having
  different temporal noise structure,you should use
  `brainiak.reprsimil.BRSA`. If you are worried about between-voxel
  correlations or temporal covaraince structures that BRSA does not
  support, you should use MNRSA.
  
  .. math::
      Y &\sim \mathcal{MN}(0, \Sigma_t + XLL^TX^T+
      X_0X_0^T, \Sigma_s)\
  
      U &= LL^T
  
  Parameters
  ----------
  time_cov : subclass of CovBase
      Temporal noise covariance class following CovBase interface.
  space_cov : subclass of CovBase
      Spatial noise covariance class following CovBase interface.
  optimizer : string, Default :'L-BFGS'
      Name of scipy optimizer to use.
  optCtrl :  dict, default: None
      Additional arguments to pass to scipy.optimize.minimize.
class_docstr_tok: ["Matrix","normal","version","of","RSA",".","The","goal","of","this","analysis","is","to","find","the","covariance","of","the","mapping","from","some","design","matrix","X","to","the","fMRI","signal","Y",".","It","does","so","by","marginalizing","over","the","actual","mapping","(","i.e",".","averaging","over","the","uncertainty","in","it",")",",","which","happens","to","correct","a","bias","imposed","by","structure","in","the","design","matrix","on","the","RSA","estimate","(","see","Cai","et","al.",",","NIPS","2016",")",".","This","implementation","makes","different","choices","about","residual","covariance","relative","to","`","brainiak.reprsimil.BRSA","`",":","Here",",","the","noise","covariance","is","assumed","to","be","kronecker-separable",".","Informally",",","this","means","that","all","voxels","have","the","same","temporal","covariance",",","and","all","time","points","have","the","same","spatial","covariance",".","This","is","in","contrast","to","BRSA",",","which","allows","different","temporal","covariance","for","each","voxel",".","On","the","other","hand",",","computational","efficiencies","enabled","by","this","choice","allow","MNRSA","to","support","a","richer","class","of","space","and","time","covariances","(","anything","in","`","brainiak.matnormal.covs","`",")",".","For","users",":","in","general",",","if","you","are","worried","about","voxels","each","having","different","temporal","noise","structure",",","you","should","use","`","brainiak.reprsimil.BRSA","`",".","If","you","are","worried","about","between-voxel","correlations","or","temporal","covaraince","structures","that","BRSA","does","not","support",",","you","should","use","MNRSA",".","..","math",":",":","Y","&","\\sim","\\mathcal","{","MN","}","(","0",",","\\Sigma_t","+","XLL^TX^T+","X_0X_0^T",",","\\Sigma_s",")","\\","U","&","=","LL^T","Parameters","--","--","--","--","--","time_cov",":","subclass","of","CovBase","Temporal","noise","covariance","class","following","CovBase","interface",".","space_cov",":","subclass","of","CovBase","Spatial","noise","covariance","class","following","CovBase","interface",".","optimizer",":","string",",","Default",":","'","L-BFGS'","Name","of","scipy","optimizer","to","use",".","optCtrl",":","dict",",","default",":","None","Additional","arguments","to","pass","to","scipy.optimize.minimize","."]
docstr: Cholesky factor of the RSA matrix.
docstr_tok: ["Cholesky","factor","of","the","RSA","matrix","."]
code: def L(self):
      """
      Cholesky factor of the RSA matrix.
      """
      return unflatten_cholesky_unique(self.L_flat)
  
file_path: brainiak/brainiak/matnormal/mnrsa.py
imports: import tensorflow
  from sklearn.base import BaseEstimator
  from sklearn.linear_model import LinearRegression
  from .covs import CovIdentity
  from brainiak.utils.utils import cov2corr
  import numpy
  from brainiak.matnormal.matnormal_likelihoods import matnorm_logp_marginal_row
  from brainiak.matnormal.utils import pack_trainable_vars, unpack_trainable_vars, make_val_and_grad, unflatten_cholesky_unique, flatten_cholesky_unique
  from scipy.optimize import minimize
label_desc: Use image node_id 2 for calling the MNRSA obj's underlying member method code with example usage: obj.L() and returns: unflatten_cholesky_unique