K-means and hierarchical clustering