Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.


Machine Learning: K-Nearest Neighbors

via Codecademy


Implement and assess the K-Nearest Neighbors algorithm.

Continue your Machine Learning journey with Machine Learning: K-Nearest Neighbors (KNN). Learn how to classify unknown data points based on their similarity to other, known, data points. Use distance and proximity to validate your predictions, and get started with classification techniques.

* Prepare data for a KNN model

* Explain distance and proximity

* Implement and assess a KNN model


  • Classification: K-Nearest Neighbors: K-Nearest Neighbors is a supervised machine learning algorithm for classification. You will implement and test this algorithm on several datasets.
    • Lesson: Distance Formula
    • Article: Normalization
    • Article: Training Set vs Validation Set vs Test Set
    • Lesson: K-Nearest Neighbors
    • Quiz: K-Nearest Neighbors
    • Project: Cancer Classifier
    • Informational: Next Steps

Taught by

Kenny Lin


4.8 rating at Codecademy based on 40 ratings

Start your review of Machine Learning: K-Nearest Neighbors

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.