'Fit Ridge regression model.
Parameters
X : {array-like, sparse matrix}, shape = [n_samples,n_features]
Training data
y : array-like, shape = [n_samples]
Target values
sample_weight : float or numpy array of shape (n_samples,)
Sample weight.
.. versionadded:: 0.17
*sample_weight* support to Classifier.
Returns
self : returns an instance of 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)
    else:
        raise ValueError(("%s    doesn't    support    multi-label    classification" % self.__class__.__name__))
    if self.class_weight:
        if (sample_weight is None):
            sample_weight = 1.0
        sample_weight = (sample_weight * compute_sample_weight(self.class_weight, y))
    super(RidgeClassifier, self).fit(X, Y, sample_weight=sample_weight)
    return self
