class_docstr: Estimator for learning linear regressors by SGD.
  
  Parameters
  ----------
  loss : str, 'squared', 'epsilon_insensitive', 'huber'
      Loss function to be used.
  
  penalty : str, 'l2', 'l1', 'l1/l2'
      The penalty to be used.
  
      - l2: ridge
      - l1: lasso
      - l1/l2: group lasso
  
  alpha : float
      Weight of the penalty term.
  
  learning_rate : 'pegasos', 'constant', 'invscaling'
      Learning schedule to use.
  
  eta0 : float
      Step size.
  
  power_t : float
      Power to be used (when learning_rate='invscaling').
  
  epsilon : float
      Value to be used for epsilon-insensitive loss.
  
  fit_intercept : bool
      Whether to fit the intercept or not.
  
  intercept_decay : float
      Value by which the intercept is multiplied (to regularize it).
  
  max_iter : int
      Maximum number of iterations to perform.
  
  shuffle : bool
      Whether to shuffle data.
  
  callback : callable
      Callback function.
  
  n_calls : int
      Frequency with which `callback` must be called.
  
  random_state : RandomState or int
      The seed of the pseudo random number generator to use.
  
  verbose : int
      Verbosity level.
docstr: Fit model according to X and y.
  
  Parameters
  ----------
  X : array-like, shape = [n_samples, n_features]
      Training vectors, where n_samples is the number of samples
      and n_features is the number of features.
  
  y : array-like, shape = [n_samples] or [n_samples, n_targets]
      Target values.
  
  Returns
  -------
  self : regressor
      Returns self.
docstr_tok: ["Fit","model","according","to","X","and","y.","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","[","n_samples",",","n_features","]","Training","vectors",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","y",":","array-like",",","shape","=","[","n_samples","]","or","[","n_samples",",","n_targets","]","Target","values",".","Returns","--","--","--","-","self",":","regressor","Returns","self","."]
code: def fit(self, X, y):
      """Fit model according to X and y.
  
      Parameters
      ----------
      X : array-like, shape = [n_samples, n_features]
          Training vectors, where n_samples is the number of samples
          and n_features is the number of features.
  
      y : array-like, shape = [n_samples] or [n_samples, n_targets]
          Target values.
  
      Returns
      -------
      self : regressor
          Returns self.
      """
      rs = check_random_state(self.random_state)
  
      ds = get_dataset(X)
      n_samples = ds.get_n_samples()
      n_features = ds.get_n_features()
  
      self.outputs_2d_ = len(y.shape) == 2
      if self.outputs_2d_:
          Y = y
      else:
          Y = y.reshape(-1, 1)
      Y = np.asfortranarray(Y)
      n_vectors = Y.shape[1]
      self.coef_ = np.zeros((n_vectors, n_features), dtype=np.float64)
      self.intercept_ = np.zeros(n_vectors, dtype=np.float64)
  
      loss = self._get_loss()
      penalty = self._get_penalty()
  
      for k in range(n_vectors):
          _binary_sgd(
              self,
              self.coef_,
              self.intercept_,
              k,
              ds,
              Y[:, k],
              loss,
              penalty,
              self.alpha,
              self._get_learning_rate(),
              self.eta0,
              self.power_t,
              self.fit_intercept,
              self.intercept_decay,
              int(self.max_iter * n_samples),
              self.shuffle,
              rs,
              self.callback,
              self.n_calls,
              self.verbose,
          )
  
      try:
          assert_all_finite(self.coef_)
      except ValueError:
          warnings.warn("coef_ contains infinite values")
  
      return self
  
imports: import warnings
  import numpy
  from sklearn.utils import check_random_state
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.utils.validation import assert_all_finite
  from .base import BaseClassifier
  from .base import BaseRegressor
  from .dataset_fast import get_dataset
  from .sgd_fast import _binary_sgd
  from .sgd_fast import _multiclass_sgd
  from .sgd_fast import ModifiedHuber
  from .sgd_fast import Hinge
  from .sgd_fast import SquaredHinge
  from .sgd_fast import Log
  from .sgd_fast import SquaredLoss
  from .sgd_fast import Huber
  from .sgd_fast import EpsilonInsensitive
  from .sgd_fast import MulticlassLog
  from .sgd_fast import MulticlassHinge
  from .sgd_fast import MulticlassSquaredHinge
label_desc: Use image node_id 3 for calling the SGDRegressor obj's underlying member method code with example usage: obj.fit(X, y) and returns: self