'Predict class probabilities for X in \'soft\' voting'

def _predict_proba(self, X):

    if (self.voting == 'hard'):
        raise AttributeError(('predict_proba    is    not    available    when    voting=%r' % self.voting))
    check_is_fitted(self, 'estimators_')
    avg = np.average(self._collect_probas(X), axis=0, weights=self._weights_not_none)
    return avg
