ProjectBeta

Marathon Runners

Hard
12 completions
~ 15 hours
4.1

Implement a KNN classification algorithm from scratch. This project covers basic data types, provides lots of opportunities to practice Python functions, and gives an idea of object-oriented programming. Besides, you're going to learn how to prepare and normalize data before feeding it into a machine-learning algorithm.

Provided by

JetBrains Academy JetBrains Academy

About

Do you want to discover a little more about machine learning? Let's implement one of the most popular algorithms! In this project, you're going to use basic python tools to code the k-nearest neighbors algorithm (KNN) that solves classification problems. In this project, you will practice concepts frequently tested in technical interviews at top tech companies.

Training project icon

Training project

This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Preprocess the input data and learn about types of variables.
Normalize continuous variables to improve the quality of the classifier.
Calculate the distance between points in an n-dimensional space employing the Euclidean distance.
Implement the majority voting based on distance.

Reviews

Klekovkina Alena avatar
Klekovkina Alena
11 months ago
Very ambiguous tasks, it took me a lot of time and effort to understand what needs to be done, had to read extra since the provided materials were not enough to get it. And lastly, the last stage and the output is so misleading, I thought that this is the correct output and spent a lot of time tryin ...
nahandove avatar
nahandove
2 years ago
This project introduces the KNN machine learning algorithm, as well as mathematical concepts such as vectors and Euclidean distance. It also introduces programming topics such as iterators, lambdas, and sorting. I feel a step closer to mastering Data science. Nice project overall!
synth avatar
synth
2 years ago
Moderator
I have learned about KNN and applied my knowledge on a really small dataset. 😬

4.1

Learners who completed this project within the Python with Algorithms for Tech Interviews course rated it as follows:
Usefulness
5.0
Fun
3.3
Clarity
4.0