class_docstr: Estimator for learning linear classifiers by (proximal) SDCA.
  
  Solves the following objective:
  
  .. code-block::
  
      minimize_w  1 / n_samples * \sum_i loss(w^T x_i, y_i)
                  + alpha * l1_ratio * ||w||_1
                  + alpha * (1 - l1_ratio) * 0.5 * ||w||^2_2
  
  Parameters
  ----------
  loss: string, {'squared', 'absolute', 'hinge', 'smooth_hinge', 'squared_hinge'}
       Loss function to use in the model.
  alpha: float
       Amount of regularization (see model formulation above).
  l1_ratio: float
       Ratio between the L1 and L2 regularization (see model formulation above).
  gamma : float
      gamma parameter in the "smooth_hinge" loss (not used for other
      loss functions)
  tol : float
      stopping criterion tolerance.
  max_iter : int
      maximum number of outer iterations (also known as epochs).
  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.
class_docstr_tok: ["Estimator","for","learning","linear","classifiers","by","(","proximal",")","SDCA",".","Solves","the","following","objective",":","..","code-block",":",":","minimize_w","1","\/","n_samples","*","\\sum_i","loss","(","w^T","x_i",",","y_i",")","+","alpha","*","l1_ratio","*","||w||_1","+","alpha","*","(","1","-","l1_ratio",")","*","0.5","*","||w||^2_2","Parameters","--","--","--","--","--","loss",":","string",",","{","'squared","'",",","'absolute","'",",","'hinge","'",",","'smooth_hinge","'",",","'squared_hinge","'","}","Loss","function","to","use","in","the","model",".","alpha",":","float","Amount","of","regularization","(","see","model","formulation","above",")",".","l1_ratio",":","float","Ratio","between","the","L1","and","L2","regularization","(","see","model","formulation","above",")",".","gamma",":","float","gamma","parameter","in","the","``","smooth_hinge","''","loss","(","not","used","for","other","loss","functions",")","tol",":","float","stopping","criterion","tolerance",".","max_iter",":","int","maximum","number","of","outer","iterations","(","also","known","as","epochs",")",".","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","."]
code: def _get_loss(self):
      losses = {
          "squared": 0,
          "absolute": 1,
          "hinge": 2,
          "smooth_hinge": 3,
          "squared_hinge": 4,
      }
      return losses[self.loss]
  
imports: import numpy
  from sklearn.utils import check_random_state
  from .base import BaseClassifier, BaseRegressor
  from .dataset_fast import get_dataset
  from .sdca_fast import _prox_sdca_fit
label_desc: Use image node_id 2 for calling the SDCAClassifier obj's underlying member method code with example usage: obj._get_loss() and returns: losses