liveBook · Manning

Hierarchical clustering

Hierarchical clustering is a clustering method that organizes observations into nested groups by successively merging or splitting clusters.

How 5 Manning books explain it

Data Without Labels

Hierarchical clustering is a clustering method that constructs a nested hierarchy of groups by successively merging or splitting clusters.

How it is used
Supports customer segmentation by producing nested groups that can be cut and assessed against business needs.
How deep it goes
Explains merging, splitting, greedy choices, dendrogram cuts, and a Python workflow; leaves the best cluster count to interpretation.
Examples
Uses five numbered observations, three linkage visualizations, and Python plots showing how distance cutoffs change clusters.
What you can do after
Apply it via SciPy linkage and fcluster, then inspect dendrograms and plotted groups before selecting a distance cutoff.

Read how Data Without Labels explains hierarchical clustering →

Statistics Slam Dunk

Hierarchical clustering is a clustering method that builds a nested hierarchy of groups based on similarity or distance.

How it is used
Segments NBA draft picks to assess whether top-five selections warrant different career expectations from other first-round picks.
How deep it goes
Works through variable selection, mean aggregation, Euclidean distances, a distance matrix, complete-linkage hclust(), and dendrogram interpretation.
Examples
Uses 2000–2009 NBA first-round pick numbers and mean career win shares, highlighting a two-group split of picks 1–5 and 6–30.
What you can do after
Build it from scratch in base R by creating distances, running hclust(), plotting a dendrogram, and inspecting chosen cluster boxes.

Read how Statistics Slam Dunk explains hierarchical clustering →

Build a Robo-Advisor with Python (From Scratch)

Hierarchical clustering is a clustering technique that organizes objects into progressively combined or subdivided groups according to a distance measure.

How it is used
Organizes correlated assets into an HRP tree before covariance reordering and recursive portfolio-weight allocation.
How deep it goes
Derives two distance matrices and implements iterative linkage, while deferring weight calculation to recursive bisection.
Examples
Works through eight ETF tickers, a distance matrix, cluster merges, asset ordering, and reordered correlation heatmaps.
What you can do after
Build it from scratch by transforming correlations into distances and merging the nearest asset clusters into a link matrix.

Read how Build a Robo-Advisor with Python (From Scratch) explains hierarchical clustering →

Advanced Algorithms and Data Structures

Hierarchical clustering is a clustering technique that forms nested groups by successively merging or dividing clusters.

How it is used
Uses unlabeled data to infer related groups and inspect alternative partitions for applications such as customer segmentation.
How deep it goes
Explains agglomerative construction, dendrograms, slicing, and parameter effects, but leaves the broader clustering taxonomy beyond the treatment.
Examples
Uses two-dimensional point datasets, progressive A–B–C grouping, dendrograms, reachability plots, and customer segmentation.
What you can do after
Evaluate or understand nested clusters, choose hierarchy snapshots, and relate implementation needs to disjoint-set data structures.

Read how Advanced Algorithms and Data Structures explains hierarchical clustering →

Domain-Specific Small Language Models

A clustering approach that builds communities through repeated refinement and aggregation of grouped items.

How it is used
Detects communities for GraphRAG indexing and later community summarization.
How deep it goes
Explains the move-refine-aggregate loop and modularity gain, but stops short of a full validated implementation.
Examples
Uses a combined graph, community summaries, and a custom Python Leiden implementation.
What you can do after
Apply it to partition graphs into communities for downstream summarization and query answering.

Read how Domain-Specific Small Language Models explains hierarchical clustering →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.