numpy.ndarray
A numpy.ndarray with the label prediction for all the samples in X.
return np.array([np.argmax(self.predict_proba(X))])
def predict_proba(self, X):
predict_proba
After Change
numpy.ndarray
A numpy.ndarray with the label prediction for all the samples in X.
preds = np.array([np.array(exp.estimator.predict(X)) * exp.weightfor exp in self.experts])
sum_weights = sum(exp.weight for exp in self.experts)
return np.sum(preds / sum_weights, axis=0, dtype=int)