# What's the main difference between FindClusters and ClusteringComponents? [closed]

In many cases, FindClusters and ClusteringComponents provide similar results. Options for hierarchical and agglomerative clustering are available for both of these functions. So, would you please help me to understand clearly the differences between them?

Just to be clear,my main question concerns about choosing appropriate function for different research questions and anlysis. That is, it's not important if the two functions (or other similar functions) produce different outputs with the same meaning rather I want to know when to use which function and why.

Also, please post any tutorial for cluster analysis in Mathematica if you aware of.

-

## closed as too localized by Oleksandr R., bill s, Sjoerd C. de Vries, Artes, JensJun 12 '13 at 22:45

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Did you try reference.wolfram.com/mathematica/tutorial/… ? –  Rod Jun 12 '13 at 16:58
@ Rod Lm , yes I did but I couldn't figure out the difference then I posted my question here. I know that there are different options but when results are similar in most the cases and ClusteringComponents is faster that the other procedures, wondering what's the advantage of FindClusters ? –  Amin Jun 12 '13 at 17:05
Take a look at the difference between ClusteringComponents[{1, 2, 3, 7, 8}, 2] and FindClusters[{1, 2, 3, 7, 8}, 2] ... –  Rod Jun 12 '13 at 17:07
@ Rod Lm ,just the outputs were different. ClusteringComponents gives cluster memberships for each element but FindClusters clusters elements into two clusters.The same results! –  Amin Jun 12 '13 at 17:15
@RodLm well, since (as you point out) the "what" is addressed in the documentation, while the "why" is unlikely to be answerable, I suppose there isn't anything left to say. As such, I'm voting to close as TL. –  Oleksandr R. Jun 12 '13 at 18:03

• FindClusters can take a custom DistanceFunction whereas ClusteringComponents can only use those listed in the documentation
• FindClusters works with strings and lists of True/False but ClusteringComponents only takes numerical arrays
• FindClusters takes a 1D list as input, ClusteringComponents can take arrays of any dimension and has a level argument to determine at what level to find clusters
It is also worth noting that with the method options "Optimize" and "Agglomerate", ClusteringComponents uses FindClusters internally. For the "KMeans" and "PAM" methods there are separate implementations, using ImageKMeansClustering and ImageKMedoidsClustering.