Member-only story

Unsupervised K-Means Clustering in Python

Moez Ali
7 min readJun 16, 2022

--

Photo by Paola Franco on Unsplash

Introduction

Clustering is the task of grouping a set of objects in such a way that those in the same group (called a cluster) are more similar to each other than to those in other groups. It is an exploratory data mining activity, and a common technique for statistical data analysis used in many fields including machine learning, pattern recognition, image analysis, information retrieval, bioinformatics, data compression, and computer graphics. Some common real-life use cases of clustering are:

  • Customer segmentation based on purchase history or interests to design targeted marketing campaigns.
  • Cluster documents into multiple categories based on tags, topics, and the content of the document.
  • Analysis of outcome in social / life science experiments to find natural groupings and patterns in the data.
Different Types of Clustering algorithms. Source: Scikit-Learn

PyCaret

PyCaret is an open-source, low-code machine learning library in Python that automates machine learning workflows. It is an end-to-end machine learning and model management tool that speeds up the experiment cycle exponentially and makes you more productive.

--

--

Moez Ali
Moez Ali

Written by Moez Ali

Data Scientist, Founder & Creator of PyCaret

Responses (2)