Wolfram Language & System 10.3 (2015)|Legacy Documentation
gives an array in which each element at the lowest level of array is replaced by an integer index representing the cluster in which the element lies.
finds at most n clusters.
finds clusters at the specified level in array.
finds clusters of pixels with similar values in image.
finds at most n clusters in image.
- ClusteringComponents[source,DistanceFunction->f] treats pairs of elements, in source as being less similar when their distances are larger.
- For images and real data, ClusteringComponents by default effectively uses the Euclidean distance function EuclideanDistance to determine the similarity of elements.
- For lists of True and False, ClusteringComponents by default uses a distance function based on the normalized fraction of elements that disagree.
- For lists of strings, ClusteringComponents by default uses a distance function based on the number of point changes needed to get from one string to another.
- Other distance functions can be specified by setting DistanceFunction. Possible settings are:
ManhattanDistance Manhattan or "city block" distance EuclideanDistance Euclidean distance SquaredEuclideanDistance squared Euclidean distance NormalizedSquaredEuclideanDistance normalized squared Euclidean distance CosineDistance angular cosine distance CorrelationDistance correlation coefficient distance
- 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 "KMeans" -means clustering algorithm "PAM" find clustering by partitioning around medoids
- ClusteringComponents accepts a option that is used to control the creation of the initial set of seeds.
- ClusteringComponents also works with Image3D objects.