Clustering Text for Marketing Segmentation, Similarity Measures, and Grouping
摘要
This chapter is your tour of unsupervised grouping for text. It starts with similarity vs. distance (Euclidean vs. cosine), then walks through the big clustering families with hands-on R:—Hierarchical agglomerative clustering (HAC): single/complete/average/Ward linkages, how to read dendrogram height, and why linkage choice changes shape. You’ll build TDMs (often TF-IDF-weighted), compute distances (Canberra, cosine), and pick cuts with helpers like NbClust.—K-means (and friends): how centroids iterate, picking k (elbow, silhouette, CH), randomness (nstart), visualizing clusters, plus variants (k-medians, k-medoids, spherical k-means for cosine/text).—Gaussian Mixture Models (GMM/EM): soft assignments (probabilities), per-cluster covariance—handles elongated/overlapping shapes better than k-means.—Density methods (DBSCAN/HDBSCAN): cluster by dense regions, auto-handles noise/outliers, no preset k; HDBSCAN relieves-tuning and favors stable clusters.—Affinity Propagation: discovers exemplars via message passing; you can let preferences determine the cluster count or set K with apclusterK(). You’ll also flip perspective to document clustering (DTM) vs term clustering (TDM), and see how segmentation/persona work emerges from groups of similar reviews. The chapter closes with validation heuristics (silhouette, CH, DB, BIC/AIC, Hartigan), caveats (scale, sparsity, outliers, non-spherical shapes), and practical R recipes to try multiple metrics/linkages and compare results.