You are on page 1of 43

Hierarchical clustering

• Agglomerative clustering produces what is known as a hierarchical clustering.

• The hierarchical clustering proceeds iteratively, and every point makes a journey from being a single
point cluster to belonging to some final cluster.

• The dendrogram shows data points as points on the bottom. Then, a tree is plotted with these points
(representing single-point clusters) as the leaves, and a new node parent is added for each two
clusters that are joined.

• Unfortunately, agglomerative clustering still fails at separating complex shapes like the two_moons
dataset.

Book: Introduction to machine learning with python


Measuring
Euclidean distances
(or dissimilarities)
Setting Threshold
for n Clusters
By Setting Threshold
dissimilarities must
be below line
Can quickly tell how
many clusters by
number of vertical
lines threshold crosses
Finding longest
vertical lines that
don’t cross any
horizontal lines

You might also like