diff --git a/01 KNN/KNN.py b/01 KNN/KNN.py index d3063e0..69ae8d8 100644 --- a/01 KNN/KNN.py +++ b/01 KNN/KNN.py @@ -25,6 +25,6 @@ def _predict(self, x): k_indices = np.argsort(distances)[:self.k] k_nearest_labels = [self.y_train[i] for i in k_indices] - # majority voye + # majority vote most_common = Counter(k_nearest_labels).most_common() - return most_common[0][0] \ No newline at end of file + return most_common[0][0]