Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Machine learning›K-Means Clustering
Machine learning

K-Means Clustering

K-Means Clustering (Lloyd–MacQueen Algorithm) · Also known as: K-Ortalamalar Kümeleme, k-ortalamalar kümeleme, k-means, centroid clustering

K-Means Clustering is a centroid-based partitional clustering algorithm, traced to J. MacQueen in 1967, that splits data into k clusters by assigning each observation to its nearest cluster centre. It is widely used for marketing segmentation, customer grouping, and exploratory analysis.

ScholarGate
  1. Machine learning
  2. v1
  3. 1 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

K-Means Clustering
Hierarchical ClusteringLinear Discriminant Anal…Random ForestAffinity PropagationAssociation Rule MiningEducational Data MiningEnsemble Gaussian Mixtur…Explainable Gaussian Mix…Explainable K-MeansFP-Growth

+7 more

When to use it

Use K-Means for exploratory analysis or classification of continuous and count-type features when you want to partition observations into a pre-specified number of groups and have at least about 50 observations. It assumes roughly spherical, similarly sized clusters and requires features to be standardised beforehand. When the sample is small (n below about 50) or the spherical-cluster assumption is doubtful, hierarchical clustering is the safer, more exploratory alternative.

Strengths & limitations

Strengths
  • Simple, fast, and scalable to large datasets with low mathematical overhead.
  • Produces clear, interpretable cluster assignments and centroids for segmentation work.
  • Assumption-light on distributions: it does not require normally distributed data.
  • Widely accepted across business, marketing, and exploratory data analysis.
Limitations
  • The number of clusters k must be fixed in advance rather than discovered from the data.
  • It assumes spherical, comparably sized clusters and struggles with irregular shapes.
  • Results depend on standardisation and on the random initial centroids.
  • On small samples (n below about 50) the centroids are unstable, giving inconsistent results across different starting points.

Frequently asked

How do I choose the number of clusters k?

k must be set before running the algorithm. The elbow method (plotting within-cluster variance against k) and silhouette analysis are the standard ways to choose and validate a sensible value.

Do I need to scale my data first?

Yes. Standardisation is mandatory because K-Means relies on distance: without it, a feature with a large range will dominate the cluster assignments and distort the grouping.

Why do I get different clusters each time?

K-Means starts from random initial centroids, so results can vary, especially on small samples where the centroids are unstable. Running multiple initialisations and keeping the best, or using a more exploratory method like hierarchical clustering, helps.

What should I check before and after clustering?

Beforehand, confirm the data is clusterable (for example with a Hopkins statistic of at least about 0.75) and choose k via the elbow method and silhouette analysis. Afterwards, report the silhouette score, describe each cluster's profile, and visualise the clusters with PCA or t-SNE.

Sources

  1. MacQueen, J. (1967). Some Methods for Classification and Analysis of Multivariate Observations. Proceedings of the 5th Berkeley Symposium on Mathematical Statistics and Probability, 1, 281–297. link ↗

How to cite this page

ScholarGate. (2026, June 1). K-Means Clustering (Lloyd–MacQueen Algorithm). ScholarGate. https://scholargate.app/en/machine-learning/k-means-clustering

Related methods

Hierarchical ClusteringLinear Discriminant Analysis (Classification)Random Forest

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Hierarchical ClusteringMachine learning↔ compare
  • Linear Discriminant Analysis (Classification)Statistics↔ compare
  • Random ForestMachine learning↔ compare
Compare side by side →

Referenced by

Affinity PropagationAssociation Rule MiningEducational Data MiningEnsemble Gaussian Mixture ModelExplainable Gaussian Mixture ModelExplainable K-MeansFP-GrowthFuzzy C-MeansGranular ComputingLatent Dirichlet AllocationNon-negative Matrix FactorizationOnline K-meansSelf-Organizing MapStochastic Block Model

Similar methods

K-meansCluster AnalysisOnline K-meansEnsemble K-meansElbow MethodBayesian K-means clusteringRobust k-meansK-Nearest Neighbors

Related reference concepts

K-Means ClusteringClustering AlgorithmsCluster AnalysisModel-Based ClusteringHierarchical Cluster AnalysisText Clustering

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — K-Means Clustering (K-Means Clustering (Lloyd–MacQueen Algorithm)). Retrieved 2026-07-21 from https://scholargate.app/en/machine-learning/k-means-clustering · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
MacQueen, J.
Year
1967
Type
Partitional clustering (centroid-based)
Task
Unsupervised clustering / segmentation
MinSample
50
RequiresNormality
No
Related methods
Hierarchical ClusteringLinear Discriminant Analysis (Classification)Random Forest
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account