Davies-Bouldin Index

Machine Learning
Introduced by
David L. Davies, Donald W. Bouldin
Year
1979
Type
Cluster quality metric
Family
Clustering Validation

What does it do?

The Davies-Bouldin Index, introduced by David L. Davies and Donald W. Bouldin in 1979, is an internal measure of clustering quality.

For each cluster, it compares the average spread of its points around the centroid with the distance between centroids, and then averages the worst such ratio across clusters. The index is non-negative, and lower values indicate a better partition.

The intuition behind the method

A good partition has clusters that are tight around their centres and far from one another. The index scores each cluster against the neighbour it resembles most, using the sum of the two clusters' average spreads divided by the distance between their centroids. A large ratio means that two clusters are spread out relative to how far apart their centres are, so they overlap or nearly merge. Averaging the worst ratio for each cluster gives one number in which a single poorly separated pair raises the score.

History

David L. Davies and Donald W. Bouldin published "A cluster separation measure" in IEEE Transactions on Pattern Analysis and Machine Intelligence in 1979. The original abstract presents the measure as a way to judge the appropriateness of data partitions and to compare different divisions of the same data. It is one of several internal validation measures, and it is often considered alongside others such as the silhouette score, which appears among this library's related methods.

When to use it

Use the Davies-Bouldin Index when you have unlabelled data, want to compare several partitions of the same dataset, and expect clusters that a centroid and an average spread can describe reasonably well. It needs only the data points, their cluster assignments and the centroids, so no external labels are required. Do not use it as the sole criterion for choosing the number of clusters: the cited original abstract states that the measure does not depend on the number of clusters analysed, but its behaviour across different values of k should still be checked on your own data. If you have ground-truth labels and want agreement with them, an external measure such as the adjusted Rand index is more appropriate.

Limitations and considerations

  • Distances are centroid-based, so the index assumes that clusters are reasonably compact and can be described by a centroid and an average spread. Elongated, curved or ring-shaped clusters can have centroids that lie outside the cluster itself, so the index may rate them poorly even when they are well separated.
  • Each cluster's term is set by its most similar neighbour, and the spread terms are averages. One very diffuse cluster therefore raises the ratio for every pair it belongs to.
  • Centroids and average spreads both depend on every point, so a few extreme values can shift the centroids and inflate the spreads.
  • The index needs at least two clusters, because the maximum over neighbours j different from i is empty for a single cluster.
  • This page uses Euclidean distance. Values computed with other distance metrics, or with a squared-distance spread, change and are not comparable with the values defined here.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Lower values consistently indicate a better partition, so different partitions of the same data can be ranked directly.
  • It uses only the data, the cluster assignments and the centroids, so no external labels are needed.
  • Because the index is built from per-cluster terms, the worst neighbouring pair for each cluster can be inspected before the values are averaged.
  • The original abstract describes the measure as independent of both the number of clusters analysed and the partitioning method, so it can be applied to the output of different algorithms.

Applications

  • Comparing candidate partitions of one dataset produced by different clustering algorithms, with the distance metric and preprocessing held fixed.
  • Screening candidate cluster counts for a fixed algorithm, provided the index's behaviour across k is checked on the data at hand.
  • Quality checks on grouping or segmentation outputs where no ground-truth labels exist and the clusters are reasonably compact.

How it works

How it works

1

For each cluster i, compute the mean Euclidean distance from the points in the cluster to its centroid; this measures within-cluster cohesion. This page uses the mean distance (not squared). Some presentations instead use a variance-type dispersion based on the mean squared distance to the centroid, and the two variants give different values, so scores from one variant must not be compared with scores from the other.

Formula
S_i = \frac{1}{n_i} \sum_{x \in C_i} ||x - \mu_i||
2

Compute the Euclidean distance between the centroids of clusters i and j; this measures between-cluster separation.

Formula
d(C_i, C_j) = ||\mu_i - \mu_j||
3

For each pair of clusters, compute the ratio of the sum of their within-cluster spreads to the distance between their centroids; higher ratios indicate greater overlap or similarity.

Formula
R_{ij} = \frac{S_i + S_j}{d(C_i, C_j)}
4

The Davies-Bouldin Index is the average, over clusters, of each cluster's maximum pair ratio; lower values indicate better overall clustering quality.

Formula
DB = \frac{1}{k} \sum_{i=1}^{k} \max_{j \neq i} R_{ij}

Common pitfalls

  • Choosing the number of clusters by taking the lowest index value without inspecting the partitions. Because each cluster is scored by its worst neighbour, one close pair can dominate a partition's score, and the lowest-scoring k may still contain a poorly separated pair.
  • Reading a low value as evidence of meaningful structure. The index summarises centroid-based compactness and separation; it does not check whether the clusters match any real grouping or whether their shapes suit a centroid description.
  • Comparing values computed with different distance metrics, normalisation or preprocessing. Each choice changes the spreads and centroid distances in the formula, so the scores are not directly comparable.
  • Computing the index on unscaled features with different units. Features with large numeric ranges dominate the Euclidean distances, so standardise the features consistently before clustering and before comparing partitions.

Frequently asked questions

What is a good Davies-Bouldin Index value?

Neither the original source nor this page gives a universal cut-off. Lower values indicate a better partition, but the values are most meaningful when compared between partitions of the same dataset, computed with the same distance metric and preprocessing.

Does the index increase as the number of clusters grows?

The cited original abstract states that the measure does not depend on the number of clusters analysed, so how the index changes with k is not established by this page. Check how the value behaves on your own data, and inspect the partitions rather than relying on the minimum alone.

How sensitive is the Davies-Bouldin Index to outliers?

Centroids and average spreads both depend on every point, so extreme values can shift both. Remove or handle outliers before computing the index, and recompute it to see whether the ranking of partitions changes.

Can I use the Davies-Bouldin Index to compare different clustering algorithms?

Yes, in the sense that a lower value ranks a partition of the same data higher. Use the same distance metric and preprocessing for all algorithms. The index does not measure agreement with ground-truth labels.

Related methods

Sources

  1. Davies, D. L., & Bouldin, D. W. (1979). A cluster separation measure. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1(2), 224-227.

    Open DOI reference