liveBook · Manning

Clustering

As explained in The Art of AI Product Development

Clustering is an unsupervised learning technique that groups data points according to similarities in their characteristics.

A product team may have plenty of user data but no clear picture of how people actually use its product. Clustering groups similar data points without predefined labels, giving the team an initial structure to investigate. Behavioral segments can reveal differences that demographic categories miss—but a mathematically coherent group is not automatically a useful customer segment. section 4.1 section 4.1.1 section 4.1.5

Turn clusters into decisions through an iterative process:

  • Choose behaviors that matter to the product question. Recommendation clicks, purchases, browsing, and profile edits may be more useful than an incidental account date; refine and scale the features. section 4.1.1 section 4.1.5
  • Try methods suited to the data and the insight needed. K-means assigns points to the nearest center and repeatedly recalculates centers; hierarchical clustering exposes broader and narrower groups; DBSCAN identifies density-based groups and outliers. section 4.1.3
  • Evaluate separation and usefulness. The silhouette coefficient compares similarity within clusters with distinction between them; the Calinski-Harabasz index assesses separation. Revisit preprocessing and parameters rather than treating the first result as final. section 4.1.4
  • Keep the number of segments workable. Too few can conceal behaviors; too many can overwhelm the team expected to act on them. section 4.1.5
Figure 4.2 K-means clustering looks for centroids surrounded by an agglomeration of data points.
A diagram of different colored dots

AI-generated content may be incorrect.

The diagram shows the centers and surrounding data points used to explain how K-means forms groups. section 4.1.3

From segments to action

An e-commerce team grouped users by their interactions with recommendations, searches, profile settings, and purchases. After visualizing and describing the clusters, it found users who repeatedly sought new recommendations, users who favored search, users who browsed without buying, and highly engaged purchasers. A user whose clicks did not fit the groups proved to be a scraping bot, prompting a security alert. To handle new sign-ups without rerunning clustering each time, the team proposed a supervised classifier trained to assign users to the established segments. section 4.1.1 section 4.1.6

Use clustering as an exploratory aid, not an automatic verdict about customers. Unlabeled data supplies no explicit target for what the model should discover, so results can be uncertain. Review whether the groups represent behaviors worth addressing before using them to guide personalization, marketing, or product changes. section 3.1.2 section 4.1 section 4.1.5

How The Art of AI Product Development covers it

How deep it goes
Works through feature choice, three algorithm options, evaluation metrics, iteration, and acting on segments without code or mathematical derivations.
Examples
Uses e-commerce recommendation and purchase behaviors, four interpreted user segments, and a scraping bot discovered as an anomaly.
What it assumes
Starts with available user data and explains grouping through a map-and-centers analogy rather than assuming knowledge of clustering algorithms.
What you can do after
Evaluate/understand candidate clusters and use validated segments to guide product actions or define classes for new users.
How it connects
Links unsupervised learning and unlabeled data to behavioral segmentation, feature engineering, anomaly detection, and supervised classification.

Also explained in

Compare how 18 books explain clustering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.