I have the formula and an example for calculating the distance between 2 clusters below,
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?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this community$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:
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.