---
title: "External, internal, relative quality measures"
subject: "Data Mining"
chapter: 5
key: "semester_7/data_mining:clustering-quality-measures"
source: https://www.bctengineer.com/q/semester_7/data_mining/clustering-quality-measures
site: BCT Engineering
---

# External, internal, relative quality measures

Data Mining · Chapter 5: Cluster Analysis

- Asked in: year not given
- Video: [Silhouette Score for clustering Explained | Silhouette (clustering)- Validating Clustering Models](https://www.youtube.com/watch?v=_jg1UFoef1c) — Unfold Data Science
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/clustering-quality-measures
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-5

## Question

Describe external, internal and relative measures of clustering quality.

## Short answer

External measures compare clustering to ground truth labels using purity, entropy, Rand index, or F-measure. Internal measures evaluate compactness and separation using only data, such as SSE, silhouette coefficient, or Dunn index. Relative measures compare different clusterings (e.g., varying k) using internal or external indices to select the best result.

## Answer

Cluster validity measures judge how good a clustering is. They are of three kinds.

#### 1. External measures
Compare the clustering with **external information**, i.e. known class labels (ground truth). Used when labels exist.
- **Purity**: for each cluster take the proportion of its most frequent class; the weighted sum over clusters is the purity.
- **Entropy** of the class distribution in each cluster (0 = perfect).
- **Precision, recall and F-measure** of each cluster with respect to a class.
- **Rand index** and **Jaccard coefficient**: count agreements of pairs of objects (same cluster/same class) between the clustering and the ground truth; **adjusted Rand index**, **normalised mutual information**.

#### 2. Internal measures
Use only the **data itself**, without external labels, to judge compactness and separation.
- **Cohesion** (within-cluster SSE): Σ over clusters Σ_{x∈Cᵢ} d(x, cᵢ)²; smaller is better.
- **Separation** (between-cluster SS): Σ |Cᵢ|·d(cᵢ, c)²; larger is better.
- **Silhouette coefficient**: for object i, a = average distance to others in its own cluster, b = smallest average distance to another cluster, s = (b − a)/max(a, b). It lies between −1 and 1; near 1 means a good clustering.
- Others: Dunn index, Davies-Bouldin index, cophenetic correlation (for hierarchical clustering).

#### 3. Relative measures
**Compare two clusterings** (or the same algorithm with different parameters, such as different k) to choose the better one. Internal or external indices are used for the comparison. *Example*: plot SSE against k and choose the "elbow", or choose the k with the highest average silhouette.

| Type | Needs labels? | Examples |
| --- | --- | --- |
| External | Yes | Purity, entropy, Rand index, F-measure |
| Internal | No | SSE, silhouette, Dunn |
| Relative | No/Yes | Compare results for different k or algorithms |

## Check yourself

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

1. What do external measures need?
   A. Only the data itself
   B. Known class labels (ground truth) to compare against
   C. Two different k values
   D. A dendrogram
   Answer: B. External measures such as purity, entropy and Rand index compare a clustering with known labels. (Key point: External measures)

2. What does a silhouette value s = (b - a)/max(a, b) near 1 indicate?
   A. Object is on a cluster boundary
   B. Object is badly clustered
   C. Object is much closer to its own cluster than to others, so clustering is good
   D. Object is an outlier
   Answer: C. Near 1 means a (own-cluster distance) is much smaller than b (nearest other cluster). (Key point: Silhouette)

3. Which direction is better for cohesion (within-cluster SSE) and separation?
   A. Cohesion smaller, separation larger
   B. Cohesion larger, separation smaller
   C. Both smaller
   D. Both larger
   Answer: A. Compact clusters have low within-cluster SSE and well-separated ones have large between-cluster SS. (Key point: Cohesion and separation)

4. What is the purpose of relative measures?
   A. To compare different clusterings, such as different k, to choose the best
   B. To find the class labels
   C. To remove outliers
   D. To compute the distance matrix
   Answer: A. Relative measures compare clusterings, e.g. the elbow of SSE versus k or the highest average silhouette. (Key point: Relative measures)

## Related in other subjects

- [Internal/external drainage; water logging; Terai surface drainage](https://www.bctengineer.com/question.md?key=semester_6%2Firrigation_and_drainage_engineering%3Ainternal-external-drainage-water-logging-terai) — Irrigation and Drainage Engineering, chapter 9
- [Page size impact; internal, external fragmentation](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Apage-size-impact-fragmentation) — Operating System, chapter 4
- [Noise, distortion, interference; internal and external noise](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Anoise-types-internal-external) — Communication Systems, chapter 1
- [External vs internal noise; interference sources; need for modulation](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aexternal-internal-noise-interference-needs) — Communication Systems, chapter 1
