class_docstr: Estimator for learning linear regressors by SAG.
  
  Solves the following objective:
  
  .. code-block::
  
      minimize_w  1 / n_samples * \sum_i loss(w^T x_i, y_i)
                  + alpha * 0.5 * ||w||^2_2
  
  Parameters
  ----------
  eta : float or {'auto', 'line-search'}, defaults to 'auto'
      step size for the gradient updates. If set to 'auto',
      this will calculate a step size based on the input data.
      If set to 'line-search', it will perform a line-search
      to find the step size based for the current iteration.
  alpha : float
      amount of squared L2 regularization.
  beta : float
      amount of regularization for the penalty term.
  loss : string
      loss to use in the objective function. Can be "modified_huber" or
      "squared".
  max_iter : int
      maximum number of outer iterations (also known as epochs).
  tol : float
      stopping criterion tolerance.
  verbose : int
      verbosity level. Set positive to print progress information.
  callback : callable or None
      if given, callback(self) will be called on each outer iteration
      (epoch).
  random_state: int or RandomState
      Pseudo-random number generator state used for random sampling.
docstr: Parameters
  ----------
  X : numpy array, sparse matrix or RowDataset of size (n_samples, n_features)
  y : numpy array of size (n_samples,)
  sample_weight : numpy array of size (n_samples,), optional
  
  Returns
  -------
  self
docstr_tok: ["Parameters","--","--","--","--","--","X",":","numpy","array",",","sparse","matrix","or","RowDataset","of","size","(","n_samples",",","n_features",")","y",":","numpy","array","of","size","(","n_samples",",",")","sample_weight",":","numpy","array","of","size","(","n_samples",",",")",",","optional","Returns","--","--","--","-","self"]
code: def fit(self, X, y, sample_weight=None):
      """
      Parameters
      ----------
      X : numpy array, sparse matrix or RowDataset of size (n_samples, n_features)
      y : numpy array of size (n_samples,)
      sample_weight : numpy array of size (n_samples,), optional
  
      Returns
      -------
      self
      """
      if not self.is_saga and self.penalty is not None:
          raise ValueError(
              "Penalties are not supported in SAGRegressor. "
              "Please use SAGARegressor instead."
          )
      self.outputs_2d_ = len(y.shape) > 1
      Y = y.reshape(-1, 1) if not self.outputs_2d_ else y
      Y = Y.astype(np.float64)
      return self._fit(X, Y, sample_weight=sample_weight)
  
imports: import numpy
  from .base import BaseClassifier, BaseRegressor
  from .dataset_fast import get_dataset
  from .sag_fast import _sag_fit, get_auto_step_size
  from .sgd_fast import ModifiedHuber
  from .sgd_fast import SmoothHinge
  from .sgd_fast import SquaredHinge
  from .sgd_fast import Log
  from .sgd_fast import SquaredLoss
  from .sag_fast import L1Penalty
label_desc: Use image node_id 2 for calling the SAGRegressor obj's underlying member method code with example usage: obj.fit(X, y, sample_weight) and returns: self