ProjectBeta

Marathon Runners

Hard
13 completions
~ 15 hours
4.3

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.

Graduate project icon

Graduate project

This project covers the core topics of the Python for Science course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

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

Mauro Gonçalves avatar
Mauro Gonçalves
4 months ago
In this project, I learned how the KNN algorithm works step by step. I practiced reading data from a file, preprocessing it, converting labels into numbers, applying one-hot encoding, and scaling continuous features with min-max normalization.
Klekovkina Alena avatar
Klekovkina Alena
2 years 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
3 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!

4.3

Learners who completed this project within the Python for Science course rated it as follows:
Usefulness
5.0
Fun
3.8
Clarity
4.3