class_docstr: Covariance and precision matrix estimator.
  
  The model used has been introduced in :footcite:t:`Varoquaux2010a`, and the
  algorithm used is based on what is described in :footcite:t:`Honorio2015`.
  
  Parameters
  ----------
  alpha : float, default=0.1
      regularization parameter. With normalized covariances matrices and
      number of samples, sensible values lie in the [0, 1] range(zero is
      no regularization: output is not sparse).
  
  tol : positive float, default=1e-3
      The tolerance to declare convergence: if the dual gap goes below
      this value, iterations are stopped.
  
  max_iter : int, default=10
      maximum number of iterations. The default value is rather
      conservative.
  
  verbose : int, default=0
      verbosity level. Zero means "no message".
  
  memory : instance of joblib.Memory or string, 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 : int, default=0
      Caching aggressiveness. Higher values mean more caching.
  
  Attributes
  ----------
  covariances_ : numpy.ndarray, shape (n_features, n_features, n_subjects)
      empirical covariance matrices.
  
  precisions_ : numpy.ndarraye, shape (n_features, n_features, n_subjects)
      precisions matrices estimated using the group-sparse algorithm.
  
  References
  ----------
  .. footbibliography::
class_docstr_tok: ["Covariance","and","precision","matrix","estimator",".","The","model","used","has","been","introduced","in",":","footcite",":","t",":","`","Varoquaux2010a","`",",","and","the","algorithm","used","is","based","on","what","is","described","in",":","footcite",":","t",":","`","Honorio2015","`",".","Parameters","--","--","--","--","--","alpha",":","float",",","default=0.1","regularization","parameter",".","With","normalized","covariances","matrices","and","number","of","samples",",","sensible","values","lie","in","the","[","0",",","1","]","range","(","zero","is","no","regularization",":","output","is","not","sparse",")",".","tol",":","positive","float",",","default=1e-3","The","tolerance","to","declare","convergence",":","if","the","dual","gap","goes","below","this","value",",","iterations","are","stopped",".","max_iter",":","int",",","default=10","maximum","number","of","iterations",".","The","default","value","is","rather","conservative",".","verbose",":","int",",","default=0","verbosity","level",".","Zero","means","``","no","message","''",".","memory",":","instance","of","joblib.Memory","or","string",",","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",":","int",",","default=0","Caching","aggressiveness",".","Higher","values","mean","more","caching",".","Attributes","--","--","--","--","--","covariances_",":","numpy.ndarray",",","shape","(","n_features",",","n_features",",","n_subjects",")","empirical","covariance","matrices",".","precisions_",":","numpy.ndarraye",",","shape","(","n_features",",","n_features",",","n_subjects",")","precisions","matrices","estimated","using","the","group-sparse","algorithm",".","References","--","--","--","--","--","..","footbibliography",":",":"]
docstr: Fits the group sparse precision model according         to the given training data and parameters.
  
  Parameters
  ----------
  subjects : list of numpy.ndarray with shapes (n_samples, n_features)
      input subjects. Each subject is a 2D array, whose columns contain
      signals. Sample number can vary from subject to subject, but all
      subjects must have the same number of features (i.e. of columns).
  
  Returns
  -------
  self : GroupSparseCovariance instance
      the object itself. Useful for chaining operations.
docstr_tok: ["Fits","the","group","sparse","precision","model","according","to","the","given","training","data","and","parameters",".","Parameters","--","--","--","--","--","subjects",":","list","of","numpy.ndarray","with","shapes","(","n_samples",",","n_features",")","input","subjects",".","Each","subject","is","a","2D","array",",","whose","columns","contain","signals",".","Sample","number","can","vary","from","subject","to","subject",",","but","all","subjects","must","have","the","same","number","of","features","(","i.e",".","of","columns",")",".","Returns","--","--","--","-","self",":","GroupSparseCovariance","instance","the","object","itself",".","Useful","for","chaining","operations","."]
code: def fit(self, subjects, y=None):
      """Fits the group sparse precision model according \
          to the given training data and parameters.
  
          Parameters
          ----------
          subjects : list of numpy.ndarray with shapes (n_samples, n_features)
              input subjects. Each subject is a 2D array, whose columns contain
              signals. Sample number can vary from subject to subject, but all
              subjects must have the same number of features (i.e. of columns).
  
          Returns
          -------
          self : GroupSparseCovariance instance
              the object itself. Useful for chaining operations.
  
          """
      logger.log("Computing covariance matrices", verbose=self.verbose)
      self.covariances_, n_samples = empirical_covariances(
          subjects, assume_centered=False
      )
  
      logger.log("Computing precision matrices", verbose=self.verbose)
      ret = self._cache(_group_sparse_covariance)(
          self.covariances_,
          n_samples,
          self.alpha,
          tol=self.tol,
          max_iter=self.max_iter,
          verbose=max(0, self.verbose - 1),
          debug=False,
      )
  
      self.precisions_ = ret
      return self
  
imports: import collections.abc
  import itertools
  import operator
  import warnings
  import numpy
  import scipy.linalg
  from joblib import Memory, Parallel, delayed
  from sklearn.base import BaseEstimator
  from sklearn.covariance import empirical_covariance
  from sklearn.model_selection import check_cv
  from sklearn.utils.extmath import fast_logdet
  from .._utils import CacheMixin, logger
  from .._utils.extmath import is_spd
label_desc: Use image node_id 2 for calling the GroupSparseCovariance obj's underlying member method code with example usage: obj.fit(subjects, y) and returns: self