parameters: (self, X, y=None)
return_statement: return self
docstring: Fits the Oracle Approximating Shrinkage 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.
docstring_summary: Fits the Oracle Approximating Shrinkage covariance model
          according to the given training data and parameters.
docstring_tokens: Fits the Oracle Approximating Shrinkage covariance model according to the given training data and parameters .
function: def fit(self, X, y=None):
          """ Fits the Oracle Approximating Shrinkage 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 computing the
          # covariance matrix (and potentially the precision)
          if self.assume_centered:
              self.location_ = np.zeros(X.shape[1])
          else:
              self.location_ = X.mean(0)
  
          covariance, shrinkage = oas(X - self.location_, assume_centered=True)
          self.shrinkage_ = shrinkage
          self._set_covariance(covariance)
  
          return self
function_tokens: def fit ( self , X , y = None ) : X = check_array ( X ) # Not calling the parent object to fit, to avoid computing the # covariance matrix (and potentially the precision) if self . assume_centered : self . location_ = np . zeros ( X . shape [ 1 ] ) else : self . location_ = X . mean ( 0 ) covariance , shrinkage = oas ( X - self . location_ , assume_centered = True ) self . shrinkage_ = shrinkage self . _set_covariance ( covariance ) return self