parameters: (self, X, y, sample_weight=None)
return_statement: return self
docstring: Fit the ridge classifier.
  
          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,)
              Target values.
  
          sample_weight : float or numpy array of shape (n_samples,)
              Sample weight.
  
          Returns
          -------
          self : object
              Returns self.
docstring_summary: Fit the ridge classifier.
docstring_tokens: Fit the ridge classifier .
function: def fit(self, X, y, sample_weight=None):
          """Fit the ridge classifier.
  
          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,)
              Target values.
  
          sample_weight : float or numpy array of shape (n_samples,)
              Sample weight.
  
          Returns
          -------
          self : object
              Returns self.
          """
          self._label_binarizer = LabelBinarizer(pos_label=1, neg_label=-1)
          Y = self._label_binarizer.fit_transform(y)
          if not self._label_binarizer.y_type_.startswith('multilabel'):
              y = column_or_1d(y, warn=True)
  
          if self.class_weight:
              if sample_weight is None:
                  sample_weight = 1.
              # modify the sample weights with the corresponding class weight
              sample_weight = (sample_weight *
                               compute_sample_weight(self.class_weight, y))
  
          _BaseRidgeCV.fit(self, X, Y, sample_weight=sample_weight)
          return self
function_tokens: def fit ( self , X , y , sample_weight = None ) : self . _label_binarizer = LabelBinarizer ( pos_label = 1 , neg_label = - 1 ) Y = self . _label_binarizer . fit_transform ( y ) if not self . _label_binarizer . y_type_ . startswith ( 'multilabel' ) : y = column_or_1d ( y , warn = True ) if self . class_weight : if sample_weight is None : sample_weight = 1. # modify the sample weights with the corresponding class weight sample_weight = ( sample_weight * compute_sample_weight ( self . class_weight , y ) ) _BaseRidgeCV . fit ( self , X , Y , sample_weight = sample_weight ) return self