Using k-Nearest Neighbors (kNN) in Python

In this video course, you’ll get a thorough introduction to the k-Nearest Neighbors (kNN) algorithm in Python. The kNN algorithm is one of the most famous machine learning algorithms and an absolute must-have in your machine learning toolbox. Python is the go-to programming language for machine learning, so what better way to discover kNN than with Python’s famous packages NumPy and scikit-learn!

You’ll explore the kNN algorithm both in theory and in practice. It’s important to learn about the mechanics of machine learning algorithms to understand their potential and limitations. At the same time, it’s essential to understand how to use an algorithm in practice. With that in mind, you’ll also focus on the use of kNN in the Python library scikit-learn.

In this video course, you’ll learn how to:

  • Explain the kNN algorithm both intuitively and mathematically
  • Implement kNN in Python from scratch using NumPy
  • Use kNN in Python with scikit-learn

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Kimberly Fessel

Kimberly Fessel Kimberly Fessel

Kimberly Fessel is a freelance data scientist and video instructor for Real Python. She specializes in data visualization, natural language processing, and technical instruction.

» More about Kimberly

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

« Browse All Courses