'Build a boosted regressor 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 (real numbers).
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.loss not in ('linear', 'square', 'exponential')):
        raise ValueError("loss    must    be    'linear',    'square',    or    'exponential'")
    return super(AdaBoostRegressor, self).fit(X, y, sample_weight)
