Hierarchical clustering is separating data into groups based on some measure of similarity, finding a way to measure how they’re alike and different, and further narrowing down the data.
Let’s consider that we have a set of cars and we want to group similar ones together. Look at the image shown below:
For starters, we have four cars that we can put into two clusters of car types: sedan and SUV. Next, we’ll bunch the sedans and the SUVs together. For the last step, we can group everything into one cluster and finish when we’re left with only one cluster.