162k views
3 votes
When would someone prefer to use hierarchical clustering vs k-means clustering?

User Reinier
by
9.1k points

1 Answer

2 votes

Final answer:

Hierarchical clustering is preferred when the data has a hierarchical structure and the number of clusters is not known, while k-means clustering is preferred when the number of clusters is known and the data does not have a hierarchical structure.

Step-by-step explanation:

In general, hierarchical clustering is preferred when the data has a hierarchical structure and when the number of clusters is not known in advance. It creates a hierarchical structure of nested clusters by recursively merging or splitting clusters based on a distance or similarity measure. On the other hand, k-means clustering is preferred when the number of clusters is known and when the data does not have a hierarchical structure.

For example, if you have a dataset of customer preferences and you want to classify them into different groups based on their preferences, you might use k-means clustering with a predetermined number of clusters. However, if you have a dataset of organisms and you want to classify them into taxonomic categories, you might use hierarchical clustering to create a dendrogram that shows the hierarchical relationships between the organisms.

User Westranger
by
7.9k points