class_docstr: This class handles the so-called on General Linear Model
  
  Most of what it does in the fit() and contrast() methods
  fit() performs the standard two-step ('ols' then 'ar1') GLM fitting
  contrast() returns a contrast instance, yileding statistics and p-values.
  The link between fit() and contrast is done vis the two class members:
  
  glm_results : dictionary of nipy.algorithms.statistics.models.
               regression.RegressionResults instances,
               describing results of a GLM fit
  
  labels : array of shape(n_voxels),
          labels that associate each voxel with a results key
class_docstr_tok: ["This","class","handles","the","so-called","on","General","Linear","Model","Most","of","what","it","does","in","the","fit","(",")","and","contrast","(",")","methods","fit","(",")","performs","the","standard","two-step","(","'ols","'","then","'ar1","'",")","GLM","fitting","contrast","(",")","returns","a","contrast","instance",",","yileding","statistics","and","p-values",".","The","link","between","fit","(",")","and","contrast","is","done","vis","the","two","class","members",":","glm_results",":","dictionary","of","nipy.algorithms.statistics.models",".","regression.RegressionResults","instances",",","describing","results","of","a","GLM","fit","labels",":","array","of","shape","(","n_voxels",")",",","labels","that","associate","each","voxel","with","a","results","key"]
docstr: Accessor for the mean squared error of the model
  
  Returns
  -------
  mse: array of shape (n_voxels)
      the sum of square error per voxel
docstr_tok: ["Accessor","for","the","mean","squared","error","of","the","model","Returns","--","--","--","-","mse",":","array","of","shape","(","n_voxels",")","the","sum","of","square","error","per","voxel"]
code: def get_mse(self):
      """Accessor for the mean squared error of the model
  
      Returns
      -------
      mse: array of shape (n_voxels)
          the sum of square error per voxel
      """
      # build the beta array
      mse = np.zeros(self.labels_.size, dtype=np.float64)
      for l in self.results_:
          mse[self.labels_ == l] = self.results_[l].MSE
      return mse
  
imports: from warnings import warn
  import numpy
  import scipy.stats
  from nibabel import Nifti1Image, load
  from nipy.algorithms.statistics.models.regression import ARModel, OLSModel
  from nipy.algorithms.statistics.utils import multiple_mahalanobis, z_score
  from nipy.io.nibcompat import get_affine, get_header
  from nipy.labs.mask import compute_mask_sessions
label_desc: Use image node_id 4 for calling the GeneralLinearModel obj's underlying member method code with example usage: obj.get_mse() and returns: mse