Nearest Neighbors
A nearest neighbors classifier guesses a new example's class by finding the k training examples closest to it and letting them vote, with KNeighborsClassifier(n_neighbors=5) storing the training rows instead of learning a rule, a small k following every quirk, a large k blurring the classes together, and a tied vote, which in the lesson's run went to the class listed first.
Updated

- Category
- Machine Learning
- Level
- Journeyman
- Tags
- ai, Euclidean Distance, Instance-Based Learning, k-Nearest Neighbors, Majority Vote, python