if not hasattr(self.classifier, "classes_"):
return [0]
return self.classifier.predict(X)
def predict_proba(self, X):
predict_proba
After Change
r, _ = get_dimensions(X)
predictions = deque()
y_proba = self.predict_proba(X)
for i in range(r):
class_val = np.argmax(y_proba[i])
predictions.append(class_val)
return np.array(predictions)
def predict_proba(self, X):
Predicts the probability of each sample belonging to each one of the