---
title: "Hierarchical clustering: AGNES and DIANA"
subject: "Data Mining"
chapter: 5
key: "semester_7/data_mining:agnes-diana"
source: https://www.bctengineer.com/q/semester_7/data_mining/agnes-diana
site: BCT Engineering
---

# Hierarchical clustering: AGNES and DIANA

Data Mining · Chapter 5: Cluster Analysis

- Asked in: year not given
- Video: [1. DIANA Clustering - Divisive Analysis Hierarchical Clustering in ML Solved Example Mahesh Huddar](https://www.youtube.com/watch?v=jcdT_pVRqlE) — Mahesh Huddar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/agnes-diana
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-5

## Question

What is hierarchical clustering? Describe AGNES and DIANA methods of hierarchical clustering approach.

## Short answer

Hierarchical clustering creates nested clusters in a dendrogram without a pre-specified number. AGNES (bottom-up) repeatedly merges the closest pair of clusters; DIANA (top-down) splits the cluster with the largest diameter until each object is a singleton.

## Answer

**Hierarchical clustering** groups data into a tree of nested clusters (a **dendrogram**), either by merging smaller clusters into larger ones or by splitting a large cluster. The user does not give k in advance; a clustering is obtained by cutting the dendrogram at a chosen level. Merges and splits are final and cannot be undone.

#### AGNES (Agglomerative Nesting), bottom-up
1. Treat each object as its own cluster; compute the distance matrix.
2. Merge the **two closest clusters** into one.
3. Update the distances between the new cluster and the others.
4. Repeat steps 2-3 until all objects are in a single cluster (or the desired k is reached).

The distance between clusters is defined by the linkage:
- **Single link**: minimum distance between two objects of different clusters.
- **Complete link**: maximum distance.
- **Average link**: average of all pairwise distances.
- **Centroid distance**.

#### DIANA (Divisive Analysis), top-down
1. Start with all objects in one cluster.
2. Choose the cluster with the largest diameter and split it: the object with the highest average dissimilarity to the others forms a "splinter group"; objects that are closer to the splinter group than to the rest move to it.
3. Repeat the splitting until each cluster has one object (or until there are k clusters).

```text
 a b c d e
 AGNES (merge)  ->  {a,b} {d,e} -> {a,b,c} {d,e} -> {a..e}
 DIANA (split)  <-  inverse order
```

| Basis | AGNES | DIANA |
| --- | --- | --- |
| Direction | Bottom-up | Top-down |
| Start | n clusters | 1 cluster |
| Step | Merge closest pair | Split the largest-diameter cluster |
| Cost | O(n²) or more | Higher, as the number of possible splits is exponential |

Both cost at least O(n²), so they are not suitable for huge data sets; BIRCH, CURE and Chameleon improve on this.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does AGNES do at each step?
   A. Splits the cluster with the largest diameter
   B. Merges the two closest clusters and updates distances
   C. Moves objects to the nearest centroid
   D. Finds core points
   Answer: B. AGNES is bottom-up: it repeatedly merges the closest pair of clusters and updates the distance matrix. (Key point: AGNES procedure)

2. How does DIANA split a cluster?
   A. The object with the highest average dissimilarity forms a splinter group, and closer objects join it
   B. The two farthest points become medoids
   C. It cuts the cluster randomly in half
   D. It merges the smallest clusters
   Answer: A. DIANA picks the largest-diameter cluster, starts a splinter group with the most dissimilar object and moves objects nearer to it. (Key point: DIANA splinter group)

3. Complete link defines the distance between two clusters as which?
   A. Minimum distance between objects of the two clusters
   B. Maximum distance between objects of the two clusters
   C. Average of all pairwise distances
   D. Distance between medoids
   Answer: B. Single link uses the minimum, complete link the maximum, and average link the mean of pairwise distances. (Key point: Linkage)

4. Which pairing is correct?
   A. AGNES: top-down, starts with 1 cluster
   B. DIANA: bottom-up, starts with n clusters
   C. AGNES: bottom-up, starts with n clusters; DIANA: top-down, starts with one cluster
   D. Both start with n clusters
   Answer: C. AGNES begins with each object as a cluster and merges; DIANA begins with one cluster and splits. (Key point: Direction and start)

## Related in Data Mining

- [Need of clustering; hierarchical vs partitioning; K-means](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acluster-need-hier-vs-partition-kmeans) — Data Mining, chapter 5
- [Short note: Partitioning and hierarchical clustering](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Apartition-hierarchical-clustering-note) — Data Mining, chapter 5
- [Short note: Hierarchical clustering](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Ahierarchical-clustering-note) — Data Mining, chapter 5
- [Major clustering approaches](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aclustering-approaches) — Data Mining, chapter 5
