class_docstr: LedoitWolf Estimator
  
  Ledoit-Wolf is a particular form of shrinkage, where the shrinkage
  coefficient is computed using O. Ledoit and M. Wolf's formula as
  described in "A Well-Conditioned Estimator for Large-Dimensional
  Covariance Matrices", Ledoit and Wolf, Journal of Multivariate
  Analysis, Volume 88, Issue 2, February 2004, pages 365-411.
  
  Read more in the :ref:`User Guide <shrunk_covariance>`.
  
  Parameters
  ----------
  store_precision : bool, default=True
      Specify if the estimated precision is stored.
  
  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 (default), data are centered before computation.
  
  block_size : int, default=1000
      Size of the blocks into which the covariance matrix will be split
      during its Ledoit-Wolf estimation. This is purely a memory
      optimization and does not affect results.
  
  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 regularised covariance is::
  
      (1 - shrinkage)*cov
              + shrinkage*mu*np.identity(n_features)
  
  where mu = trace(cov) / n_features
  and shrinkage is given by the Ledoit and Wolf formula (see References)
  
  References
  ----------
  "A Well-Conditioned Estimator for Large-Dimensional Covariance Matrices",
  Ledoit and Wolf, Journal of Multivariate Analysis, Volume 88, Issue 2,
  February 2004, pages 365-411.
class_docstr_tok: ["LedoitWolf","Estimator","Ledoit-Wolf","is","a","particular","form","of","shrinkage",",","where","the","shrinkage","coefficient","is","computed","using","O.","Ledoit","and","M.","Wolf","'s","formula","as","described","in","``","A","Well-Conditioned","Estimator","for","Large-Dimensional","Covariance","Matrices","''",",","Ledoit","and","Wolf",",","Journal","of","Multivariate","Analysis",",","Volume","88",",","Issue","2",",","February","2004",",","pages","365-411",".","Read","more","in","the",":","ref",":","`","User","Guide","<","shrunk_covariance",">","`",".","Parameters","--","--","--","--","--","store_precision",":","bool",",","default=True","Specify","if","the","estimated","precision","is","stored",".","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","(","default",")",",","data","are","centered","before","computation",".","block_size",":","int",",","default=1000","Size","of","the","blocks","into","which","the","covariance","matrix","will","be","split","during","its","Ledoit-Wolf","estimation",".","This","is","purely","a","memory","optimization","and","does","not","affect","results",".","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","regularised","covariance","is",":",":","(","1","-","shrinkage",")","*","cov","+","shrinkage","*","mu","*","np.identity","(","n_features",")","where","mu","=","trace","(","cov",")","\/","n_features","and","shrinkage","is","given","by","the","Ledoit","and","Wolf","formula","(","see","References",")","References","--","--","--","--","--","''","A","Well-Conditioned","Estimator","for","Large-Dimensional","Covariance","Matrices","''",",","Ledoit","and","Wolf",",","Journal","of","Multivariate","Analysis",",","Volume","88",",","Issue","2",",","February","2004",",","pages","365-411","."]
docstr: Fits the Ledoit-Wolf 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","Ledoit-Wolf","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 Ledoit-Wolf 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.
  
      """
      # Not calling the parent object to fit, to avoid computing the
      # covariance matrix (and potentially the precision)
      X = check_array(X)
      if self.assume_centered:
          self.location_ = np.zeros(X.shape[1])
      else:
          self.location_ = X.mean(0)
      covariance, shrinkage = ledoit_wolf(
          X - self.location_,
          assume_centered=True,
          block_size=self.block_size,
      )
      self.shrinkage_ = 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 LedoitWolf obj's underlying member method code with example usage: obj.fit(X, y) and returns: self