From the course: Supervised Learning Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Discovering your k-nearest neighbors - Python Tutorial
From the course: Supervised Learning Essential Training
Discovering your k-nearest neighbors
- [Instructor] Let's talk about the K-Nearest Neighbors Algorithm. You may be wondering about the name, but you'll soon understand the concept of neighboring data points and how we use K as a standard for any integer. The nearest neighbors for any given point or like the context clues for what class a row of data is in. K-Nearest Neighbors assume similar things exist nearby each other. K-Nearest Neighbors or KNNs for short, make new predictions by calculating the difference between the new example and all of the other examples in the training set. The K or number of examples in the training set closest to our new one or average to get the class or value for regression problems. Before we dig into the algorithm, we should understand the different ways to mathematically measure the distance between two points. Being able to measure distance between points plays an important role in machine learning. The most common…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.