Three 1-D clusters are C1={1,3}, C2={7,9,11} and C3={20,24}. Using the Euclidean distance, compute the Davies–Bouldin index. Is a larger or smaller value better?

Unsupervised learning, Cluster evaluation
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can compute scatter and separation and combine them using the worst-case neighbour of each cluster.

Key idea

DB=1k∑imax⁡j≠iRij with Rij=Si+SjMij, where Si is the average distance of points in cluster i to its centroid and Mij is the distance between the centroids. Smaller is better.

Steps

  1. Centroids: μ1=2, μ2=9, μ3=22.
  2. Scatters: S1=(1+1)/2=1, S2=(2+0+2)/3=4/3, S3=(2+2)/2=2.
  3. Centroid distances: M12=7, M13=20, M23=13.
  4. Ratios: R12=(1+4/3)/7=1/3, R13=(1+2)/20=0.15, R23=(4/3+2)/13=10/39≈0.256.
  5. Worst neighbour per cluster: D1=max⁡(1/3,0.15)=1/3, D2=max⁡(1/3,0.256)=1/3, D3=max⁡(0.15,0.256)=10/39.
  6. DB=13(13+13+1039)=1239=413≈0.308. Smaller is better, since it means compact clusters that are far apart.

Common mistakes

How long your answer should be

Half a page; 3–4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Unsupervised learning: Six points have true classes A,A,A,B,B,B (points 1–6) and a clustering puts points {1,2} in cluster 1 and {3,4,5,6} in cluster 2. Compute the Rand index and the purity. Why is the Rand index alone not enough?
Next in Unsupervised learning: Run DBSCAN with ε=2 and minPts=4 (counting the point itself) on the 1-D points {0,1,2,3,5,7,8,9,10,20}. Label each point as core, border or noise. What happens to the point 5?