The base R hclust() function answers a practical segmentation question: which NBA draft selections have similar win-share profiles? It builds hierarchical clusters from a distance matrix and a chosen clustering method. section 3.9
The function works in a clear sequence:
- Begin with 30 observations, assigning each record to its own cluster. section 3.9
- Merge the most similar clusters repeatedly until all observations form one cluster. section 3.9
Clustering NBA draft selections
After aggregating win shares by first-round pick, calculate Euclidean distances with dist(draft_clust_final, method = "euclidean"). Complete linkage compares the maximum distance between points in different clusters. The dendrogram then shows when clusters merge at different similarity levels. section 3.9
