'Predict regression target for X.
The predicted regression target of an input sample is computed as the
mean predicted regression targets of the estimators in the ensemble.
Parameters
X : {array-like, sparse matrix} of shape = [n_samples, n_features]
The training input samples. Sparse matrices are accepted only if
they are supported by the base estimator.
Returns
y : array of shape = [n_samples]
The predicted values.'

def predict(self, X):

    check_is_fitted(self, 'estimators_features_')
    X = check_array(X, accept_sparse=['csr', 'csc'])
    (n_jobs, n_estimators, starts) = _partition_estimators(self.n_estimators, self.n_jobs)
    all_y_hat = Parallel(n_jobs=n_jobs, verbose=self.verbose)((delayed(_parallel_predict_regression)(self.estimators_[starts[i]:starts[(i + 1)]], self.estimators_features_[starts[i]:starts[(i + 1)]], X) for i in range(n_jobs)))
    y_hat = (sum(all_y_hat) / self.n_estimators)
    return y_hat
