class_docstr: Sparse inverse covariance estimation with an l1-penalized estimator.
  
  Read more in the :ref:`User Guide <sparse_inverse_covariance>`.
  
  .. versionchanged:: v0.20
      GraphLasso has been renamed to GraphicalLasso
  
  Parameters
  ----------
  alpha : float, default=0.01
      The regularization parameter: the higher alpha, the more
      regularization, the sparser the inverse covariance.
      Range is (0, inf].
  
  mode : {'cd', 'lars'}, default='cd'
      The Lasso solver to use: coordinate descent or LARS. Use LARS for
      very sparse underlying graphs, where p > n. Elsewhere prefer cd
      which is more numerically stable.
  
  covariance : "precomputed", default=None
      If covariance is "precomputed", the input data in `fit` is assumed
      to be the covariance matrix. If `None`, the empirical covariance
      is estimated from the data `X`.
  
      .. versionadded:: 1.3
  
  tol : float, default=1e-4
      The tolerance to declare convergence: if the dual gap goes below
      this value, iterations are stopped. Range is (0, inf].
  
  enet_tol : float, default=1e-4
      The tolerance for the elastic net solver used to calculate the descent
      direction. This parameter controls the accuracy of the search direction
      for a given column update, not of the overall parameter estimate. Only
      used for mode='cd'. Range is (0, inf].
  
  max_iter : int, default=100
      The maximum number of iterations.
  
  verbose : bool, default=False
      If verbose is True, the objective function and dual gap are
      plotted at each iteration.
  
  eps : float, default=eps
      The machine-precision regularization in the computation of the
      Cholesky diagonal factors. Increase this for very ill-conditioned
      systems. Default is `np.finfo(np.float64).eps`.
  
      .. versionadded:: 1.3
  
  assume_centered : bool, default=False
      If True, data are not centered before computation.
      Useful when working with data whose mean is almost, but not exactly
      zero.
      If False, data are centered before computation.
  
  Attributes
  ----------
  location_ : ndarray of shape (n_features,)
      Estimated location, i.e. the estimated mean.
  
  covariance_ : ndarray of shape (n_features, n_features)
      Estimated covariance matrix
  
  precision_ : ndarray of shape (n_features, n_features)
      Estimated pseudo inverse matrix.
  
  n_iter_ : int
      Number of iterations run.
  
  costs_ : list of (objective, dual_gap) pairs
      The list of values of the objective function and the dual gap at
      each iteration. Returned only if return_costs is True.
  
      .. versionadded:: 1.3
  
  n_features_in_ : int
      Number of features seen during :term:`fit`.
  
      .. versionadded:: 0.24
  
  feature_names_in_ : ndarray of shape (`n_features_in_`,)
      Names of features seen during :term:`fit`. Defined only when `X`
      has feature names that are all strings.
  
      .. versionadded:: 1.0
  
  See Also
  --------
  graphical_lasso : L1-penalized covariance estimator.
  GraphicalLassoCV : Sparse inverse covariance with
      cross-validated choice of the l1 penalty.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sklearn.covariance import GraphicalLasso
  >>> true_cov = np.array([[0.8, 0.0, 0.2, 0.0],
  ...                      [0.0, 0.4, 0.0, 0.0],
  ...                      [0.2, 0.0, 0.3, 0.1],
  ...                      [0.0, 0.0, 0.1, 0.7]])
  >>> np.random.seed(0)
  >>> X = np.random.multivariate_normal(mean=[0, 0, 0, 0],
  ...                                   cov=true_cov,
  ...                                   size=200)
  >>> cov = GraphicalLasso().fit(X)
  >>> np.around(cov.covariance_, decimals=3)
  array([[0.816, 0.049, 0.218, 0.019],
         [0.049, 0.364, 0.017, 0.034],
         [0.218, 0.017, 0.322, 0.093],
         [0.019, 0.034, 0.093, 0.69 ]])
  >>> np.around(cov.location_, decimals=3)
  array([0.073, 0.04 , 0.038, 0.143])
class_docstr_tok: ["Sparse","inverse","covariance","estimation","with","an","l1-penalized","estimator",".","Read","more","in","the",":","ref",":","`","User","Guide","<","sparse_inverse_covariance",">","`",".","..","versionchanged",":",":","v0.20","GraphLasso","has","been","renamed","to","GraphicalLasso","Parameters","--","--","--","--","--","alpha",":","float",",","default=0.01","The","regularization","parameter",":","the","higher","alpha",",","the","more","regularization",",","the","sparser","the","inverse","covariance",".","Range","is","(","0",",","inf","]",".","mode",":","{","'cd","'",",","'lars","'","}",",","default='cd'","The","Lasso","solver","to","use",":","coordinate","descent","or","LARS",".","Use","LARS","for","very","sparse","underlying","graphs",",","where","p",">","n.","Elsewhere","prefer","cd","which","is","more","numerically","stable",".","covariance",":","``","precomputed","''",",","default=None","If","covariance","is","``","precomputed","''",",","the","input","data","in","`","fit","`","is","assumed","to","be","the","covariance","matrix",".","If","`","None","`",",","the","empirical","covariance","is","estimated","from","the","data","`","X","`",".","..","versionadded",":",":","1.3","tol",":","float",",","default=1e-4","The","tolerance","to","declare","convergence",":","if","the","dual","gap","goes","below","this","value",",","iterations","are","stopped",".","Range","is","(","0",",","inf","]",".","enet_tol",":","float",",","default=1e-4","The","tolerance","for","the","elastic","net","solver","used","to","calculate","the","descent","direction",".","This","parameter","controls","the","accuracy","of","the","search","direction","for","a","given","column","update",",","not","of","the","overall","parameter","estimate",".","Only","used","for","mode='cd","'",".","Range","is","(","0",",","inf","]",".","max_iter",":","int",",","default=100","The","maximum","number","of","iterations",".","verbose",":","bool",",","default=False","If","verbose","is","True",",","the","objective","function","and","dual","gap","are","plotted","at","each","iteration",".","eps",":","float",",","default=eps","The","machine-precision","regularization","in","the","computation","of","the","Cholesky","diagonal","factors",".","Increase","this","for","very","ill-conditioned","systems",".","Default","is","`","np.finfo","(","np.float64",")",".eps","`",".","..","versionadded",":",":","1.3","assume_centered",":","bool",",","default=False","If","True",",","data","are","not","centered","before","computation",".","Useful","when","working","with","data","whose","mean","is","almost",",","but","not","exactly","zero",".","If","False",",","data","are","centered","before","computation",".","Attributes","--","--","--","--","--","location_",":","ndarray","of","shape","(","n_features",",",")","Estimated","location",",","i.e",".","the","estimated","mean",".","covariance_",":","ndarray","of","shape","(","n_features",",","n_features",")","Estimated","covariance","matrix","precision_",":","ndarray","of","shape","(","n_features",",","n_features",")","Estimated","pseudo","inverse","matrix",".","n_iter_",":","int","Number","of","iterations","run",".","costs_",":","list","of","(","objective",",","dual_gap",")","pairs","The","list","of","values","of","the","objective","function","and","the","dual","gap","at","each","iteration",".","Returned","only","if","return_costs","is","True",".","..","versionadded",":",":","1.3","n_features_in_",":","int","Number","of","features","seen","during",":","term",":","`","fit","`",".","..","versionadded",":",":","0.24","feature_names_in_",":","ndarray","of","shape","(","`","n_features_in_","`",",",")","Names","of","features","seen","during",":","term",":","`","fit","`",".","Defined","only","when","`","X","`","has","feature","names","that","are","all","strings",".","..","versionadded",":",":","1.0","See","Also","--","--","--","--","graphical_lasso",":","L1-penalized","covariance","estimator",".","GraphicalLassoCV",":","Sparse","inverse","covariance","with","cross-validated","choice","of","the","l1","penalty",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","sklearn.covariance","import","GraphicalLasso",">",">",">","true_cov","=","np.array","(","[","[","0.8",",","0.0",",","0.2",",","0.0","]",",","...","[","0.0",",","0.4",",","0.0",",","0.0","]",",","...","[","0.2",",","0.0",",","0.3",",","0.1","]",",","...","[","0.0",",","0.0",",","0.1",",","0.7","]","]",")",">",">",">","np.random.seed","(","0",")",">",">",">","X","=","np.random.multivariate_normal","(","mean=","[","0",",","0",",","0",",","0","]",",","...","cov=true_cov",",","...","size=200",")",">",">",">","cov","=","GraphicalLasso","(",")",".fit","(","X",")",">",">",">","np.around","(","cov.covariance_",",","decimals=3",")","array","(","[","[","0.816",",","0.049",",","0.218",",","0.019","]",",","[","0.049",",","0.364",",","0.017",",","0.034","]",",","[","0.218",",","0.017",",","0.322",",","0.093","]",",","[","0.019",",","0.034",",","0.093",",","0.69","]","]",")",">",">",">","np.around","(","cov.location_",",","decimals=3",")","array","(","[","0.073",",","0.04",",","0.038",",","0.143","]",")"]
docstr: Fit the GraphicalLasso model to X.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      Data from which to compute the covariance estimate.
  
  y : Ignored
      Not used, present for API consistency by convention.
  
  Returns
  -------
  self : object
      Returns the instance itself.
docstr_tok: ["Fit","the","GraphicalLasso","model","to","X.","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_features",")","Data","from","which","to","compute","the","covariance","estimate",".","y",":","Ignored","Not","used",",","present","for","API","consistency","by","convention",".","Returns","--","--","--","-","self",":","object","Returns","the","instance","itself","."]
code: def fit(self, X, y=None):
      """Fit the GraphicalLasso model to X.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          Data from which to compute the covariance estimate.
  
      y : Ignored
          Not used, present for API consistency by convention.
  
      Returns
      -------
      self : object
          Returns the instance itself.
      """
      # Covariance does not make sense for a single feature
      X = self._validate_data(
          X, ensure_min_features=2, ensure_min_samples=2
      )
  
      if self.covariance == "precomputed":
          emp_cov = X.copy()
          self.location_ = np.zeros(X.shape[1])
      else:
          emp_cov = empirical_covariance(
              X, assume_centered=self.assume_centered
          )
          if self.assume_centered:
              self.location_ = np.zeros(X.shape[1])
          else:
              self.location_ = X.mean(0)
  
      (
          self.covariance_,
          self.precision_,
          self.costs_,
          self.n_iter_,
      ) = _graphical_lasso(
          emp_cov,
          alpha=self.alpha,
          cov_init=None,
          mode=self.mode,
          tol=self.tol,
          enet_tol=self.enet_tol,
          max_iter=self.max_iter,
          verbose=self.verbose,
          eps=self.eps,
      )
      return self
  
imports: import operator
  import sys
  import time
  import warnings
  from numbers import Integral, Real
  import numpy
  from scipy import linalg
  from ..base import _fit_context
  from ..exceptions import ConvergenceWarning
  from ..linear_model import _cd_fast
  from ..linear_model import lars_path_gram
  from ..model_selection import check_cv, cross_val_score
  from ..utils._param_validation import Interval, StrOptions, validate_params
  from ..utils.metadata_routing import _RoutingNotSupportedMixin
  from ..utils.parallel import Parallel, delayed
  from ..utils.validation import _is_arraylike_not_scalar, check_random_state, check_scalar
  from .None import EmpiricalCovariance, empirical_covariance, log_likelihood
label_desc: Use image node_id 2 for calling the GraphicalLasso obj's underlying member method code with example usage: obj.fit(X, y) and returns: self