class_docstr: Base class for inverse covariance estimators.
  
  Provides initialization method, metrics, scoring function,
  and ebic model selection.
  
  Parameters
  -----------
  score_metric : one of 'log_likelihood' (default), 'frobenius', 'spectral',
                'kl', or 'quadratic'
      Used for computing self.score().
  
  init_method : one of 'corrcoef', 'cov', 'spearman', 'kendalltau',
      or a custom function.
      Computes initial covariance and scales lambda appropriately.
      Using the custom function extends graphical model estimation to
      distributions beyond the multivariate Gaussian.
      The `spearman` or `kendalltau` options extend inverse covariance
      estimation to nonparanormal and transelliptic graphical models.
      Custom function must return ((n_features, n_features) ndarray, float)
      where the scalar parameter will be used to scale the penalty lam.
  
  auto_scale : bool
      If True, will compute self.lam_scale_ = max off-diagonal value when
      init_method='cov'.
      If false, then self.lam_scale_ = 1.
      lam_scale_ is used to scale user-supplied self.lam during fit.
  
  Attributes
  ----------
  covariance_ : 2D ndarray, shape (n_features, n_features)
      Estimated covariance matrix
  
      This can also be a len(path) list of
      2D ndarray, shape (n_features, n_features)
      (e.g., see mode='path' in QuicGraphLasso)
  
  precision_ : 2D ndarray, shape (n_features, n_features)
      Estimated pseudo-inverse matrix.
  
      This can also be a len(path) list of
      2D ndarray, shape (n_features, n_features)
      (e.g., see mode='path' in QuicGraphLasso)
  
  sample_covariance_ : 2D ndarray, shape (n_features, n_features)
      Estimated sample covariance matrix
  
  lam_scale_ : (float)
      Additional scaling factor on lambda (due to magnitude of
      sample_covariance_ values).
class_docstr_tok: ["Base","class","for","inverse","covariance","estimators",".","Provides","initialization","method",",","metrics",",","scoring","function",",","and","ebic","model","selection",".","Parameters","--","--","--","--","--","-","score_metric",":","one","of","'log_likelihood","'","(","default",")",",","'frobenius","'",",","'spectral","'",",","'kl","'",",","or","'quadratic'","Used","for","computing","self.score","(",")",".","init_method",":","one","of","'corrcoef","'",",","'cov","'",",","'spearman","'",",","'kendalltau","'",",","or","a","custom","function",".","Computes","initial","covariance","and","scales","lambda","appropriately",".","Using","the","custom","function","extends","graphical","model","estimation","to","distributions","beyond","the","multivariate","Gaussian",".","The","`","spearman","`","or","`","kendalltau","`","options","extend","inverse","covariance","estimation","to","nonparanormal","and","transelliptic","graphical","models",".","Custom","function","must","return","(","(","n_features",",","n_features",")","ndarray",",","float",")","where","the","scalar","parameter","will","be","used","to","scale","the","penalty","lam",".","auto_scale",":","bool","If","True",",","will","compute","self.lam_scale_","=","max","off-diagonal","value","when","init_method='cov","'",".","If","false",",","then","self.lam_scale_","=","1.","lam_scale_","is","used","to","scale","user-supplied","self.lam","during","fit",".","Attributes","--","--","--","--","--","covariance_",":","2D","ndarray",",","shape","(","n_features",",","n_features",")","Estimated","covariance","matrix","This","can","also","be","a","len","(","path",")","list","of","2D","ndarray",",","shape","(","n_features",",","n_features",")","(","e.g.",",","see","mode='path","'","in","QuicGraphLasso",")","precision_",":","2D","ndarray",",","shape","(","n_features",",","n_features",")","Estimated","pseudo-inverse","matrix",".","This","can","also","be","a","len","(","path",")","list","of","2D","ndarray",",","shape","(","n_features",",","n_features",")","(","e.g.",",","see","mode='path","'","in","QuicGraphLasso",")","sample_covariance_",":","2D","ndarray",",","shape","(","n_features",",","n_features",")","Estimated","sample","covariance","matrix","lam_scale_",":","(","float",")","Additional","scaling","factor","on","lambda","(","due","to","magnitude","of","sample_covariance_","values",")","."]
code: def __init__(
      self,
      score_metric="log_likelihood",
      init_method="cov",
      auto_scale=True,
  ):
      self.score_metric = score_metric
      self.init_method = init_method
      self.auto_scale = auto_scale
  
      # these must be updated upon self.fit()
      # the first 4 will be set if self.init_coefs is used.
      #   self.covariance_
      #   self.precision_
      #   self.sample_covariance_
      #   self.lam_scale_
      #   self.n_samples_
      #   self.n_features_
      #   self.is_fitted_
  
      super(InverseCovarianceEstimator, self).__init__()
  
file_path: skggm/inverse_covariance/inverse_covariance.py
imports: from __future__ import absolute_import
  import numpy
  from sklearn.base import BaseEstimator
  from .None import metrics
  from .rank_correlation import spearman_correlation, kendalltau_correlation
label_desc: Use image node_id 1 to create a new InverseCovarianceEstimator object from inherited base classes: BaseEstimator with example: obj = InverseCovarianceEstimator(score_metric, init_method, auto_scale)