AI Glossary / AI and machine learning / Intermediate
Centroid-based clustering
Definition
Centroid-based clustering groups data by assigning every point to the nearest center, or centroid, with k-means the best-known method, producing a chosen number of compact groups.
What it means
Clustering is unsupervised: no labels are given. The algorithm finds structure by itself, grouping points that sit close together and keeping distant points apart.
In centroid-based methods, each group is summarized by its center, and membership is decided by nearness to that center. K-means is the classic; you pick k, the number of groups, in advance.
The method is fast, simple and easy to explain, which is why it is usually the first segmentation tool tried on customers, products, stores or documents.
Its limits are just as clear. It assumes groups are compact and roughly round, it needs k guessed up front, and different random starts can give different answers, so results vary run to run.
For a business, centroid-based clustering is often how segments are born: four customer groups for campaigns, five store types for planning. The segments are a model, not a discovery of natural law, and they should be judged by usefulness.
Because every point belongs to its nearest center, k-means draws straight boundaries between clusters, which is why elongated or intertwined groups get sliced awkwardly.
How it works
Choose k, then place k initial centroids, usually at random or with a spread-out heuristic.
Repeat two steps: assign each point to its nearest centroid, then move each centroid to the average of its members. Stop when assignments stabilize, usually within tens of rounds.
Run the whole process several times with different starting points and keep the best result, because a bad start can trap the algorithm in a poor grouping.
Pick k by combining evidence: an elbow chart of within-group spread against k, plus the business question of how many segments you can actually act on.
Read the result as a profile per cluster, check sizes for tiny or giant groups, and re-run periodically as customer behavior drifts.
The algorithm only improves a score, the total within-cluster spread, and knows nothing about meaning. Two runs with equal scores can give segments a manager judges very differently.
Three practical examples
- Retail: four customer segments built from spend, frequency, recency and channel mix, each with its own campaign.
- Operations: grouping stores by sales rhythm so each type gets a fitting stock plan.
- Content: grouping thousands of help articles so gaps and overlaps become visible.
Think of it this way
Think of placing k umbrellas on a crowded beach. Everyone walks to the nearest umbrella; then each umbrella is moved to the center of its crowd. Repeat a few times and the umbrellas settle where the crowds are.
The limit: if the crowds are long and curved, or if you brought the wrong number of umbrellas, the fit is poor, and no amount of moving fixes a wrong k.
Worked example
segmenting two thousand customers
Suppose a wholesaler clusters 2,000 trade customers on four measures and tries k from two to eight, plotting within-group spread each time.
The elbow bends near five, but one of the five segments holds only 40 customers. The team merges it into a neighbor and works with four segments. The figures are illustrative.
Sales managers name the segments from their centroids: big steady, big seasonal, small frequent, small fading, and each gets a different visit schedule.
The team re-runs the clustering every quarter and tracks how many customers change segment, as an early signal of shifting demand.
Illustrative case study
A fictional subscription service clusters users into six engagement segments and builds a save campaign for the fading segment.
Three months later the fading segment has grown. Investigation shows the product changed, so the old centroids no longer describe anyone. Re-clustering on fresh data restores a useful picture.
The invented lesson: segments expire. Clustering is a snapshot of behavior, and the snapshot needs retaking as the business and its customers move.
The service also fixes a labeling slip: early decks called the clusters personas, which invited storytelling beyond the data, so reports now separate the measured profile from the invented name.
Common misconceptions and mistakes
- The algorithm finds the right number of clusters. K is chosen by people; the algorithm only fills in the groups for the k it is given.
- Clusters are natural truths. They are useful fictions; different methods and seeds give different, equally honest answers.
- It handles any group shape. Compact, separated, similar-sized groups are its comfort zone; curves and chains need other methods.
Business use
Start segmentation projects with k-means, but involve the people who will act on the segments in naming and validating them.
Treat cluster assignments as perishable: re-run on fresh data on a schedule, and watch how much membership shifts between runs.
Budget time for the naming workshop. Segments only drive action when the people running campaigns believe in them, and belief comes from reading the profiles, not the chart.
People also ask
How do I choose k?
Combine an elbow chart with judgment: the right k is also the number of segments your team can genuinely serve differently.
Is k-means artificial intelligence?
It is unsupervised machine learning: it finds structure in unlabeled data rather than predicting known labels.
What if my groups overlap heavily?
Expect blurry boundaries; consider soft clustering or accept that segments are approximations.
Is k-means the only centroid method?
No. K-medoids and spherical k-means are common variants, for outlier resistance and text respectively.
Check your understanding
Why run k-means several times with different starting points?
Answer: Because the result depends on the start; multiple runs reveal and avoid poor groupings that a single unlucky start can produce.
Related terms
Learn next
AI for Business Owners helps you turn clustering output into segments the business can actually serve: https://aiforbusinessandlife.com/academy/ai-for-business-owners. [C2]
More in AI and machine learning
- Case-based reasoning - Case-based reasoning is an approach to problem solving that uses relevant past cases to help address a new situation.
- Categorical data - Categorical data is data that names a group or label rather than measuring an amount, such as country, product type, plan level or payment method.
- Category utility - Category utility is a score for judging how informative a grouping is.
- Characteristic samples - A characteristic sample is a set of labeled examples sufficient for a particular learning algorithm to identify a particular target language under a...
- Chi-square automatic interaction detection - Chi-square automatic interaction detection, usually called CHAID, is a method for building decision trees.
- Circuit (neural network) - In neural-network interpretability, a circuit is a collection of internal components and connections that work together to produce a particular behavior.
Sources
[S2] Google, Machine Learning Glossary. Full URLs are in the source ledger. Verified 11 October 2026.
Previous: Centroid Next: Cepstral coefficients