How KMeans Works and how to Train one in Python

Опубликовано: 05 Апрель 2026
на канале: The Data Journey
49
2

✍️ My Substack: https://thedatajourney.substack.com/

🐍 Udemy's Python For Absolute Beginners: https://www.udemy.com/course/the-pyth...

🧑‍🏫 Udemy Profile: https://www.udemy.com/user/ivo-bernardo/

✍️ My Medium:   / ivopbernardo  

🌍 My LinkedIn:   / en  

-------------------------------------------------------------------------------------------------

🌳 K-means clustering is a popular clustering algorithm used in data analysis and machine learning. Unlike hierarchical clustering, which organizes data points into a tree-like structure, k-means focuses on partitioning the data into a predetermined number of clusters. The algorithm works by iteratively assigning data points to clusters based on the mean (centroid) of the points in each cluster, followed by updating the centroids to minimize the overall variance within the clusters.

📰 Medium Article Here: https://medium.com/towards-data-scien...

📓 Notebook: https://colab.research.google.com/dri...

💾 Dataset: https://www.kaggle.com/datasets/camnu...

🎶🎷 bedtime after a coffee by Barradeen |   / barradeen   Creative Commons Attribution-ShareAlike 3.0 Unported https://creativecommons.org/licenses/... Music promoted by https://www.chosic.com/free-music/all/

00:00 - 11:40 - Theory Walkthrough
11:40 - 33:42 - Practical Implementation
-----------------------------------------------------------
If you would like to learn Python from scratch, feel free to grab my course on Udemy: https://www.udemy.com/course/the-pyth... - would love to have you around!