'Predict regression value for X.
The predicted regression value of an input sample is computed
as the weighted median prediction of the classifiers in the ensemble.
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.
Returns
y : array of shape = [n_samples]
The predicted regression values.'

def predict(self, X):

    check_is_fitted(self, 'estimator_weights_')
    X = self._validate_X_predict(X)
    return self._get_median_predict(X, len(self.estimators_))
