K-means clustering finds groupings in unlabeled data by assigning each observation to its nearest centroid, then iteratively updating the centroids until assignments stabilize. It partitions observations into a specified number of groups, aiming for similar observations within each cluster and distinct observations across clusters. This geometric objective does not directly measure how much uncertainty the clusters eliminate or how informative they are. section 5.3.4
K-means clustering
K-means clustering partitions observations into a specified number of groups by assigning them to the nearest centroid and iteratively updating the centroids.
How Timeless Algorithms, The Foundational Ideas covers it
- How deep it goes
- Explains nearest-centroid assignment, iterative centroid updates, and the geometric goal of within-cluster similarity and between-cluster distinction.
- Examples
- Illustrates clustering with customer purchasing behavior, patient characteristics, and social-network communities.
- What you can do after
- Understand how nearest-centroid assignments and iterative updates produce geometric clusters from unlabeled data.
- How it connects
- Connects k-means to unsupervised learning, centroids, feature-space geometry, hierarchical clustering, and entropy-based evaluation.
Also explained in
-
Data Without LabelsK-means clustering is an iterative clustering algorithm that partitions observations into a specified number of groups by minimizing within-group squared distance to cluster centroids.
-
Advanced Algorithms and Data StructuresK-means is an iterative clustering algorithm that partitions observations into a specified number of clusters by minimizing within-cluster squared distances to cluster centroids.
-
Statistics Slam DunkK-means is a clustering algorithm that partitions observations into a prespecified number of groups by minimizing within-group squared distances to cluster centroids.
-
Classic Computer Science Problems in Swift: Essential techniques for practicing programmersK-means clustering is an iterative unsupervised learning algorithm that partitions data points into a predefined number of clusters by repeatedly assigning points to their nearest centroid and recomputing the centroids.
-
Build AI Drug Discovery PipelinesK-means clustering partitions data into a specified number of groups by iteratively assigning points to nearby centroids and recomputing the centroids.
-
The Well-Grounded Data AnalystK-means is a clustering algorithm that partitions observations into a specified number of groups by minimizing distances from observations to their assigned cluster centers.
-
Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AIK-means clustering partitions data into a specified number of clusters by iteratively assigning points to their nearest cluster centroid and updating the centroids.
-
Build AI-Enhanced Web AppsK-means clustering is an unsupervised clustering algorithm that assigns data points to a chosen number of groups according to their distances from cluster centers.
-
AI-Powered SearchK-means is an unsupervised clustering algorithm that partitions items into a specified number of groups by iteratively assigning items to and updating cluster centroids.
-
Grokking Machine Learning, Second EditionK-means clustering is an iterative algorithm that assigns data points to clusters around movable centers of mass.
-
Retrieval Augmented Generation, The Foundational IdeasK-means is a clustering algorithm that partitions data points into a fixed number of clusters by assigning each point to one cluster.
Compare how 12 books explain K-means clustering →
Related concepts
- centroiduses · A point representing the center of a set of points or a region, commonly calculated as the coordinate-wise mean or, for weighted points, the weighted mean.
- Euclidean distanceuses · Euclidean distance is the straight-line distance between two points, calculated as the square root of the sum of squared differences between corresponding coordinates.
- clusteringproduces · Clustering is the process of grouping data items so that items within a group are more similar to one another than to items in other groups.
- hard clusteringkind of · Hard clustering assigns each observation to at most one cluster, with all clusters represented at the same hierarchy level.
- hierarchical clusteringcontrasts with · Hierarchical clustering is a clustering method that organizes observations into nested groups by successively merging or splitting clusters.
- unsupervised learningkind of · Unsupervised learning is a machine-learning approach that discovers patterns, structure, or representations in data without labeled target outputs.
This explainer was generated by Manning's knowledge graph from the text of Timeless Algorithms, The Foundational Ideas. The section links point to the parts of the book it draws on.











