Subsurface Syntax

Subsurface Syntax

K-Means Clustering — An Introduction

An overview of a popular unsupervised machine learning method

Andy McDonald's avatar
Andy McDonald
Aug 07, 2022
∙ Paid

An overview of a popular unsupervised machine learning method

Photo by Karolina Grabowska and obtained from Pexels.com.

When we are working with unlabelled datasets during the Exploratory Data Analysis phase of a project, we may be interested in separating our data into groups based on similarities. This allows us to easily identify any patterns that may exist within the data that may not be immediately obvious to the human eye. This is achieved through the unsupervised learning process of clustering.

One of the most popular clustering methods to achieve the grouping of data based on similarities is K-means clustering. It is a very commonly used unsupervised machine learning algorithm that is relatively easy to understand and easy to implement within Python.

Within this article, we will be covering the basics of the K-means clustering algorithm.

What is Clustering?

Clustering is an unsupervised machine learning process that aims to separate an unlabelled dataset into a number of groups base…

Keep reading with a 7-day free trial

Subscribe to Subsurface Syntax to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 Andy McDonald · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture