partitions the into clusters of similar elements.

returns the corresponding to the in each cluster.

gives the same result.

partitions the into exactly n clusters.

Details and OptionsDetails and Options

  • FindClusters[{e1,e2,},DistanceFunction->f] treats pairs of elements as being less similar when their distances are larger.
  • If the are vectors of numbers, FindClusters by default in effect uses the Euclidean distance function EuclideanDistance.
  • If the are lists of True and False, FindClusters by default uses a distance function based on the normalized fraction of elements that disagree.
  • If the are strings, FindClusters by default uses a distance function based on the number of point changes needed to get from one string to another.
  • For images, FindClusters[{img1,img2,},DistanceFunction->f] effectively uses DistanceFunction->(ImageDistance[#1,#2,DistanceFunction->f]&).
  • A Method option can be used to specify different methods of clustering. Possible settings include:
  • "Agglomerate"find clustering hierarchically
    "Optimize"find clustering by local optimization
Introduced in 2007
| Updated in 2012