Home › Glossary › Data › K-means clustering

Beginner · Data

K-means clustering

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. K-means clustering is an algorithm that partitions data into k distinct clusters based on feature similarity.

Technical Definition

K-means clustering is an algorithm that partitions data into k distinct clusters based on feature similarity.

How it works

K-means clustering is an unsupervised learning algorithm used to partition a dataset into 'k' distinct, non-overlapping clusters. Each data point is assigned to the cluster with the nearest centroid (mean), and the centroids are iteratively updated until the cluster assignments stabilize. It's widely used for tasks like customer segmentation and anomaly detection.

Related Concepts

  • Clustering — An unsupervised technique that groups similar data points without using labels.
  • Unsupervised Learning — Learning patterns from data that has no labels — only the inputs.
  • Data mining — Discovering patterns and insights in large datasets using methods from machine learning, statistics, and databases.

Further Reading

  • Wikipedia — Glossary of AI