k-Means algorithm for data clustering Created byJuliette Chalant Devlesaver|Updated27 July 2024Interested in learning more about k-means clustering in Python? This tutorial will take you through the basics of clustering, take you step-by-step through the k-means clustering in Python, and will help you establish if this method of clustering is best suited for your problem. What is clustering? Before diving into k-means clustering, it’s important to cover the basics of clustering and the different algorithms. Clustering is a method of dividing data into groups (or clusters!). These clusters can therefore be defined as groups of ‘data objects’. Through clustering, you can identify if that data that is meaningful (which expand domain knowledge) or useful (intermediate step in a data pipeline). To help cover the foundational knowledge needed to understand k-means clustering, this tutorial breaks down the 3 most-known categories of clustering algorithms:Partitional (divides data objects into nonoverlapping groups)Hierarchical (determines cluster assignments by building a hierarchy)Density-based (determines cluster assignments based on the density of data points in the region)k-meansWhile there are many types of clustering methods, the k-means is considered one of the most approachable: it’s an unsupervised machine learning technique used to identify clusters of data objectives in a dataset. Using concrete real-world examples, this comprehensive tutorial by Real Python will help you to:Define k-means clusteringExplain when you should use k-means clustering to analyse dataChoose the appropriate number of clusters Implement k-means clustering in Python with Scikit-Learn Evaluate clustering performance of algorithmsBuild and tune a k-means clustering pipeline in PythonAnalyse clustering results from the k-means algorithmGet started!Ready to get started with k-means algorithm? Start the tutorial! Learning contentWebsite linkk-Means algorithm for data clusteringTarget audienceDigital skills for ICT professionals and other digital experts.Digital skills in education.Digital skill levelIntermediateAdvancedDigital ExpertGeographic scope - CountryAustriaBelgiumBulgariaCyprusRomaniaSloveniaCroatiaCzech republicDenmarkEstoniaFinlandFranceGermanyGreeceHungaryItalyIrelandMaltaLatviaLithuaniaLuxembourgNetherlandsPortugalPolandSwedenSpainSlovakiaAlbaniaBelarusBosnia and HerzegovinaCanadaIcelandIsraelJapanKosovoMontenegroMoroccoNorth MacedoniaNorwaySerbiaSwitzerlandSouth KoreaRussiaTunisiaTurkeyUkraineUnited KingdomUSAShow moreShow less Share this page Log in to comment
AI4GOV - Module C. Basic concepts and techniques in AI in public services - Unsupervised learning. Clustering Learning content