class_docstr: Covariance estimator with shrinkage
  
  Read more in the :ref:`User Guide <shrunk_covariance>`.
  
  Parameters
  ----------
  store_precision : boolean, default True
      Specify if the estimated precision is stored
  
  shrinkage : float, 0 <= shrinkage <= 1, default 0.1
      Coefficient in the convex combination used for the computation
      of the shrunk estimate.
  
  assume_centered : boolean, 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
  ----------
  covariance_ : array-like, shape (n_features, n_features)
      Estimated covariance matrix
  
  precision_ : array-like, shape (n_features, n_features)
      Estimated pseudo inverse matrix.
      (stored only if store_precision is True)
  
  `shrinkage` : float, 0 <= shrinkage <= 1
      Coefficient in the convex combination used for the computation
      of the shrunk estimate.
  
  Notes
  -----
  The regularized covariance is given by
  
  (1 - shrinkage)*cov
    + shrinkage*mu*np.identity(n_features)
  
  where mu = trace(cov) / n_features
class_docstr_tok: ["Covariance","estimator","with","shrinkage","Read","more","in","the",":","ref",":","`","User","Guide","<","shrunk_covariance",">","`",".","Parameters","--","--","--","--","--","store_precision",":","boolean",",","default","True","Specify","if","the","estimated","precision","is","stored","shrinkage",":","float",",","0","<","=","shrinkage","<","=","1",",","default","0.1","Coefficient","in","the","convex","combination","used","for","the","computation","of","the","shrunk","estimate",".","assume_centered",":","boolean",",","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","--","--","--","--","--","covariance_",":","array-like",",","shape","(","n_features",",","n_features",")","Estimated","covariance","matrix","precision_",":","array-like",",","shape","(","n_features",",","n_features",")","Estimated","pseudo","inverse","matrix",".","(","stored","only","if","store_precision","is","True",")","`","shrinkage","`",":","float",",","0","<","=","shrinkage","<","=","1","Coefficient","in","the","convex","combination","used","for","the","computation","of","the","shrunk","estimate",".","Notes","--","--","-","The","regularized","covariance","is","given","by","(","1","-","shrinkage",")","*","cov","+","shrinkage","*","mu","*","np.identity","(","n_features",")","where","mu","=","trace","(","cov",")","\/","n_features"]
docstr: Fits the shrunk covariance model
  according to the given training data and parameters.
  
  Parameters
  ----------
  X : array-like, shape = [n_samples, n_features]
      Training data, where n_samples is the number of samples
      and n_features is the number of features.
  
  y : not used, present for API consistence purpose.
  
  Returns
  -------
  self : object
      Returns self.
docstr_tok: ["Fits","the","shrunk","covariance","model","according","to","the","given","training","data","and","parameters",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","[","n_samples",",","n_features","]","Training","data",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","y",":","not","used",",","present","for","API","consistence","purpose",".","Returns","--","--","--","-","self",":","object","Returns","self","."]
code: def fit(self, X, y=None):
      """Fits the shrunk covariance model
      according to the given training data and parameters.
  
      Parameters
      ----------
      X : array-like, shape = [n_samples, n_features]
          Training data, where n_samples is the number of samples
          and n_features is the number of features.
  
      y : not used, present for API consistence purpose.
  
      Returns
      -------
      self : object
          Returns self.
  
      """
      X = check_array(X)
      # Not calling the parent object to fit, to avoid a potential
      # matrix inversion when setting the precision
      if self.assume_centered:
          self.location_ = np.zeros(X.shape[1])
      else:
          self.location_ = X.mean(0)
      covariance = empirical_covariance(
          X, assume_centered=self.assume_centered
      )
      covariance = shrunk_covariance(covariance, self.shrinkage)
      self._set_covariance(covariance)
  
      return self
  
imports: from __future__ import division
  import warnings
  import numpy
  from .empirical_covariance_ import empirical_covariance, EmpiricalCovariance
  from ..externals.six.moves import xrange
  from ..utils import check_array
label_desc: Use image node_id 2 for calling the ShrunkCovariance obj's underlying member method code with example usage: obj.fit(X, y) and returns: self