Project

K-Means Clustering from Scratch

Medium
41 completions
~ 16 hours
3.9

Consolidate your knowledge of K-Means by creating a working algorithm from scratch. Find appropriate positions for clusters on the training loop, select an appropriate k to see how well the whole thing performs.

Provided by

JetBrains Academy JetBrains Academy

About

In this project, you'll dive into implementing one of the simplest algorithms to cluster your data: K-Means. Explore it from scratch using only numpy and matplotlib for visualization. We'll stick to the Wine dataset, so at least it will not be boring!

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:
Find a new cluster center using the information from the previous step.
Implement the whole fit-predict class and make the algorithm work.
Try using your coded algorithm with different values of k to find an appropriate one.
Automate the process of finding an appropriate k by writing a function for that.
Finish the task by using the power of your code to predict clusters for each object of the dataset and compare them to the "real" clusters (classes).

Reviews

Tomas Kanuch avatar
Tomas Kanuch
2 weeks ago
I have learned basic underlying process in K-Means clustering:Euclidean distance calculation, Cluster assignment, Centroid recomputation, Iterative convergence loop, OOP design with CustomKMeans, Inertia calculation, Elbow method, Automatic elbow detection, Silhouette score evaluation, Visualizatio ...
User 634624865 avatar
User 634624865
2 months ago
K-means method and its use to cluster data, deeper knowledge on NumPy and additionally a short introduction into linux
Krzysztof Kopel avatar
Krzysztof Kopel
1 year ago
Actually, quite a lot (although the project could be even bigger if you were to include more advanced topics).

3.9

Learners who completed this project within the Introduction to Data Science course rated it as follows:
Usefulness
4.3
Fun
3.9
Clarity
3.5