Solved – distance between 2 clusters

distance

I have the formula and an example for calculating the distance between 2 clusters below,

enter image description here

I couldn't figure out why and how {2,4,8} can become 8 and {-5,0,5} can become -5. Can someone please enlighten me please?

Best Answer

$D$ is a linkage criteria, it is known as complete linkage. Goto Wikipedia:

https://en.wikipedia.org/wiki/Hierarchical_clustering#Metric

and you should see this:

enter image description here

Does the formula look similar to yours?

The distance between the two clusters is the maximum between the two clusters. Obviously, $8$ and $-5$ are the furthest in your scenario. For instance, $D(8,0)$ = |8-0| = only 8.