class_docstr: This analysis allows maximum likelihood estimation of regression models
  in the presence of both spatial and temporal covariance.
  
  ..math::
      Y \sim \mathcal{MN}(Xeta, time_cov, space_cov)
  
  Parameters
  ----------
  time_cov : subclass of CovBase
      TR noise covariance class following CovBase interface.
  space_cov : subclass of CovBase
      Voxel noise covariance class following CovBase interface.
  optimizer : string, default="L-BFGS-B"
      Scipy optimizer to use. For other options, see "method" argument
      of scipy.optimize.minimize
  optCtrl: dict, default=None
      Additional arguments to pass to scipy.optimize.minimize.
class_docstr_tok: ["This","analysis","allows","maximum","likelihood","estimation","of","regression","models","in","the","presence","of","both","spatial","and","temporal","covariance",".","..","math",":",":","Y","\\sim","\\mathcal","{","MN","}","(","X\beta",",","time_cov",",","space_cov",")","Parameters","--","--","--","--","--","time_cov",":","subclass","of","CovBase","TR","noise","covariance","class","following","CovBase","interface",".","space_cov",":","subclass","of","CovBase","Voxel","noise","covariance","class","following","CovBase","interface",".","optimizer",":","string",",","default=","''","L-BFGS-B","''","Scipy","optimizer","to","use",".","For","other","options",",","see","``","method","''","argument","of","scipy.optimize.minimize","optCtrl",":","dict",",","default=None","Additional","arguments","to","pass","to","scipy.optimize.minimize","."]
docstr: Decode design matrix from fMRI dataset, based on a previously
  trained mapping. This method just does naive MLE:
  
  .. math::
      X = Y \Sigma_s^{-1}B^T(B \Sigma_s^{-1} B^T)^{-1}
  
  Parameters
  ----------
  Y : np.array, TRs by voxels.
      fMRI dataset
docstr_tok: ["Decode","design","matrix","from","fMRI","dataset",",","based","on","a","previously","trained","mapping",".","This","method","just","does","naive","MLE",":","..","math",":",":","X","=","Y","\\Sigma_s^","{","-1","}","B^T","(","B","\\Sigma_s^","{","-1","}","B^T",")","^","{","-1","}","Parameters","--","--","--","--","--","Y",":","np.array",",","TRs","by","voxels",".","fMRI","dataset"]
code: def calibrate(self, Y):
      """Decode design matrix from fMRI dataset, based on a previously
      trained mapping. This method just does naive MLE:
  
      .. math::
          X = Y \\Sigma_s^{-1}B^T(B \\Sigma_s^{-1} B^T)^{-1}
  
      Parameters
      ----------
      Y : np.array, TRs by voxels.
          fMRI dataset
      """
  
      if Y.shape[1] <= self.n_c:
          raise RuntimeError(
              "More conditions than voxels! System is singular,\
                                  cannot decode."
          )
  
      # Sigma_s^{-1} B'
      Sigma_s_btrp = self.space_cov.solve(tf.transpose(a=self.beta))
      # Y Sigma_s^{-1} B'
      Y_Sigma_Btrp = tf.matmul(Y, Sigma_s_btrp).numpy()
      # (B Sigma_s^{-1} B')^{-1}
      B_Sigma_Btrp = tf.matmul(self.beta, Sigma_s_btrp).numpy()
  
      X_test = np.linalg.solve(B_Sigma_Btrp.T, Y_Sigma_Btrp.T).T
  
      return X_test
  
file_path: brainiak/brainiak/matnormal/regression.py
imports: import tensorflow
  import numpy
  from sklearn.base import BaseEstimator
  from brainiak.matnormal.matnormal_likelihoods import matnorm_logp
  from brainiak.matnormal.utils import pack_trainable_vars, unpack_trainable_vars, make_val_and_grad
  from scipy.optimize import minimize
label_desc: Use image node_id 5 for calling the MatnormalRegression obj's underlying member method code with example usage: obj.calibrate(Y) and returns: X_test