class_docstr: Base class for matrix factorization based decomposition estimators.
  
  Handles mask logic, provides transform and inverse_transform methods
  
   .. versionadded:: 0.2
  
  Parameters
  ----------
  n_components : int, default=20
      Number of components to extract, for each 4D-Niimage
  
  random_state : int or RandomState, optional
      Pseudo number generator state used for random sampling.
  
  mask : Niimg-like object or MultiNiftiMasker instance, optional
      Mask to be used on data. If an instance of masker is passed,
      then its mask will be used. If no mask is given, it will be computed
      automatically by a MultiNiftiMasker with default parameters.
  %(smoothing_fwhm)s
  standardize : boolean, default=True
      If standardize is True, the time-series are centered and normed:
      their mean is put to 0 and their variance to 1 in the time dimension.
  
  standardize_confounds : boolean, default=True
      If standardize_confounds is True, the confounds are z-scored:
      their mean is put to 0 and their variance to 1 in the time dimension.
  
  detrend : boolean, default=True
      This parameter is passed to signal.clean. Please see the related
      documentation for details.
  
  low_pass : None or float, optional
      This parameter is passed to signal.clean. Please see the related
      documentation for details
  
  high_pass : None or float, optional
      This parameter is passed to signal.clean. Please see the related
      documentation for details
  
  t_r : float, optional
      This parameter is passed to signal.clean. Please see the related
      documentation for details
  
  target_affine : 3x3 or 4x4 matrix, optional
      This parameter is passed to image.resample_img. Please see the
      related documentation for details.
  
  target_shape : 3-tuple of integers, optional
      This parameter is passed to image.resample_img. Please see the
      related documentation for details.
  
  %(mask_strategy)s
  
      .. note::
           Depending on this value, the mask will be computed from
           :func:`nilearn.masking.compute_background_mask`,
           :func:`nilearn.masking.compute_epi_mask`, or
           :func:`nilearn.masking.compute_brain_mask`.
  
      Default='epi'.
  
  mask_args : dict, optional
      If mask is None, these are additional parameters passed to
      masking.compute_background_mask or masking.compute_epi_mask
      to fine-tune mask computation. Please see the related documentation
      for details.
  
  memory : instance of joblib.Memory or str, optional
      Used to cache the masking process.
      By default, no caching is done. If a string is given, it is the
      path to the caching directory.
  
  memory_level : integer, default=0
      Rough estimator of the amount of memory used by caching. Higher value
      means more memory for caching.
  
  n_jobs : integer, default=1
      The number of CPUs to use to do the computation. -1 means
      'all CPUs', -2 'all CPUs but one', and so on.
  
  verbose : integer, default=0
      Indicate the level of verbosity. By default, nothing is printed.
  
  Attributes
  ----------
  mask_img_ : Niimg-like object
      See :ref:`extracting_data`.
      The mask of the data. If no mask was given at masker creation, contains
      the automatically computed mask.
class_docstr_tok: ["Base","class","for","matrix","factorization","based","decomposition","estimators",".","Handles","mask","logic",",","provides","transform","and","inverse_transform","methods","..","versionadded",":",":","0.2","Parameters","--","--","--","--","--","n_components",":","int",",","default=20","Number","of","components","to","extract",",","for","each","4D-Niimage","random_state",":","int","or","RandomState",",","optional","Pseudo","number","generator","state","used","for","random","sampling",".","mask",":","Niimg-like","object","or","MultiNiftiMasker","instance",",","optional","Mask","to","be","used","on","data",".","If","an","instance","of","masker","is","passed",",","then","its","mask","will","be","used",".","If","no","mask","is","given",",","it","will","be","computed","automatically","by","a","MultiNiftiMasker","with","default","parameters",".","%","(","smoothing_fwhm",")","s","standardize",":","boolean",",","default=True","If","standardize","is","True",",","the","time-series","are","centered","and","normed",":","their","mean","is","put","to","0","and","their","variance","to","1","in","the","time","dimension",".","standardize_confounds",":","boolean",",","default=True","If","standardize_confounds","is","True",",","the","confounds","are","z-scored",":","their","mean","is","put","to","0","and","their","variance","to","1","in","the","time","dimension",".","detrend",":","boolean",",","default=True","This","parameter","is","passed","to","signal.clean",".","Please","see","the","related","documentation","for","details",".","low_pass",":","None","or","float",",","optional","This","parameter","is","passed","to","signal.clean",".","Please","see","the","related","documentation","for","details","high_pass",":","None","or","float",",","optional","This","parameter","is","passed","to","signal.clean",".","Please","see","the","related","documentation","for","details","t_r",":","float",",","optional","This","parameter","is","passed","to","signal.clean",".","Please","see","the","related","documentation","for","details","target_affine",":","3x3","or","4x4","matrix",",","optional","This","parameter","is","passed","to","image.resample_img",".","Please","see","the","related","documentation","for","details",".","target_shape",":","3-tuple","of","integers",",","optional","This","parameter","is","passed","to","image.resample_img",".","Please","see","the","related","documentation","for","details",".","%","(","mask_strategy",")","s","..","note",":",":","Depending","on","this","value",",","the","mask","will","be","computed","from",":","func",":","`","nilearn.masking.compute_background_mask","`",",",":","func",":","`","nilearn.masking.compute_epi_mask","`",",","or",":","func",":","`","nilearn.masking.compute_brain_mask","`",".","Default='epi","'",".","mask_args",":","dict",",","optional","If","mask","is","None",",","these","are","additional","parameters","passed","to","masking.compute_background_mask","or","masking.compute_epi_mask","to","fine-tune","mask","computation",".","Please","see","the","related","documentation","for","details",".","memory",":","instance","of","joblib.Memory","or","str",",","optional","Used","to","cache","the","masking","process",".","By","default",",","no","caching","is","done",".","If","a","string","is","given",",","it","is","the","path","to","the","caching","directory",".","memory_level",":","integer",",","default=0","Rough","estimator","of","the","amount","of","memory","used","by","caching",".","Higher","value","means","more","memory","for","caching",".","n_jobs",":","integer",",","default=1","The","number","of","CPUs","to","use","to","do","the","computation",".","-1","means","'all","CPUs","'",",","-2","'all","CPUs","but","one","'",",","and","so","on",".","verbose",":","integer",",","default=0","Indicate","the","level","of","verbosity",".","By","default",",","nothing","is","printed",".","Attributes","--","--","--","--","--","mask_img_",":","Niimg-like","object","See",":","ref",":","`","extracting_data","`",".","The","mask","of","the","data",".","If","no","mask","was","given","at","masker","creation",",","contains","the","automatically","computed","mask","."]
code: def _check_components_(self):
      if not hasattr(self, "components_"):
          raise ValueError(
              "Object has no components_ attribute. "
              "This is probably because fit has not "
              "been called."
          )
  
imports: import glob
  import itertools
  from math import ceil
  import numpy
  from joblib import Memory, Parallel, delayed
  from scipy import linalg
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.linear_model import LinearRegression
  from sklearn.utils import check_random_state
  from sklearn.utils.extmath import randomized_svd, svd_flip
  import nilearn
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn.maskers import NiftiMapsMasker
  from .._utils import fill_doc
  from .._utils.cache_mixin import CacheMixin, cache
  from .._utils.niimg import safe_get_data
  from .._utils.niimg_conversions import resolve_globbing
  from ..signal import row_sum_of_squares
label_desc: Use image node_id 3 for calling the _BaseDecomposition obj's underlying member method code with example usage: obj._check_components_() without return types