predictions = []
y_proba = self.predict_proba(X)
for i in range(r):
index = y_proba[i].index(max(y_proba[i]))
predictions.append(index)
return predictions
def predict_proba(self, X):
After Change
for i in range(r):
index = np.argmax(y_proba[i])
predictions.append(index)
return np.array(predictions)
def predict_proba(self, X):
Predicts probabilities of all label of the X instance(s)