KNN (K Nearest Neighbors)
Machine Learning
Abstract
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
Downloads
Published
2022-12-12
How to Cite
Liang, J. (2022). KNN (K Nearest Neighbors): Machine Learning. POGIL Activity Clearinghouse, 3(4). Retrieved from https://pac.pogil.org/index.php/pac/article/view/303
Issue
Section
CS-POGIL Activity Writing Program
License
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.