Hierarchical clustering in machine learning