'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. Will be cast to X\'s dtype if necessary
sample_weight : float or numpy array of shape (n_samples,)
Sample weight.
Returns
self : object
Returns self.'

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.0
        sample_weight = (sample_weight * compute_sample_weight(self.class_weight, y))
    _BaseRidgeCV.fit(self, X, Y, sample_weight=sample_weight)
    return self
