parameters: (self, X, y, Xy=None)
return_statement: return self
docstring: Fit the model using X, y as training data.
  
          Parameters
          ----------
          X : array-like of shape (n_samples, n_features)
              Training data.
  
          y : array-like of shape (n_samples,) or (n_samples, n_targets)
              Target values.
  
          Xy : array-like of shape (n_samples,) or (n_samples, n_targets), \
                  default=None
              Xy = np.dot(X.T, y) that can be precomputed. It is useful
              only when the Gram matrix is precomputed.
  
          Returns
          -------
          self : object
              returns an instance of self.
docstring_summary: Fit the model using X, y as training data.
docstring_tokens: Fit the model using X y as training data .
function: def fit(self, X, y, Xy=None):
          """Fit the model using X, y as training data.
  
          Parameters
          ----------
          X : array-like of shape (n_samples, n_features)
              Training data.
  
          y : array-like of shape (n_samples,) or (n_samples, n_targets)
              Target values.
  
          Xy : array-like of shape (n_samples,) or (n_samples, n_targets), \
                  default=None
              Xy = np.dot(X.T, y) that can be precomputed. It is useful
              only when the Gram matrix is precomputed.
  
          Returns
          -------
          self : object
              returns an instance of self.
          """
          X, y = check_X_y(X, y, y_numeric=True, multi_output=True)
  
          alpha = getattr(self, 'alpha', 0.)
          if hasattr(self, 'n_nonzero_coefs'):
              alpha = 0.  # n_nonzero_coefs parametrization takes priority
              max_iter = self.n_nonzero_coefs
          else:
              max_iter = self.max_iter
  
          self._fit(X, y, max_iter=max_iter, alpha=alpha, fit_path=self.fit_path,
                    Xy=Xy)
  
          return self
function_tokens: def fit ( self , X , y , Xy = None ) : X , y = check_X_y ( X , y , y_numeric = True , multi_output = True ) alpha = getattr ( self , 'alpha' , 0. ) if hasattr ( self , 'n_nonzero_coefs' ) : alpha = 0. # n_nonzero_coefs parametrization takes priority max_iter = self . n_nonzero_coefs else : max_iter = self . max_iter self . _fit ( X , y , max_iter = max_iter , alpha = alpha , fit_path = self . fit_path , Xy = Xy ) return self