KNN (K Nearest Neighbors)
This activity focuses on predicting the property of unknown points based on the similarity of K nearest neighbors on a two-dimensional plane. Specifically, in model 1, students will predict the color of an unknown point using KNN classification. In model 2, students will predict the y value of a point using KNN regression. In both two models, students will discuss the choice of the optimal K.
This activity was developed with NSF support through IUSE-1626765. You may request access to this activity via the following link: IntroCS-POGIL Activity Writing Program.
- Level: Undergraduate
- Setting: Classroom
- Activity Type: Learning Cycle
- Discipline: Computer Science
- Course: Machine Learning
- Keywords: nearest neighbors, classification, regression
How to Cite
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.