Hierarchical clustering adopts either an agglomerative or divisive method to build a hierarchy of clusters. Regardless of which approach is adopted, both initially use a distance similarity measure to combine clusters or split clusters. The recursive process continues until there is only one cluster left or one cannot split more clusters. Eventually, we can use a dendrogram to represent the hierarchy of clusters. In this recipe, we will demonstrate how to cluster hotel location data with hierarchical clustering.
In this recipe, we will perform hierarchical clustering on hotel location data to identify whether the hotels are located in the same district. You can download the data from the following GitHub link:
https://github.com/ywchiu/rcookbook/raw/master/chapter12/taipei_hotel.csv