'Build a boosted classifier from the training set (X, y).
Parameters
X : {array-like, sparse matrix} of shape = [n_samples, n_features]
The training input samples. Sparse matrix can be CSC, CSR, COO,
DOK, or LIL. DOK and LIL are converted to CSR.
y : array-like of shape = [n_samples]
The target values (class labels).
sample_weight : array-like of shape = [n_samples], optional
Sample weights. If None, the sample weights are initialized to
``1 / n_samples``.
Returns
self : object
Returns self.'

def fit(self, X, y, sample_weight=None):

    if (self.algorithm not in ('SAMME', 'SAMME.R')):
        raise ValueError(('algorithm    %s    is    not    supported' % self.algorithm))
    return super(AdaBoostClassifier, self).fit(X, y, sample_weight)
