FindClusters

WMA link


FindClusters[list]

returns a list of clusters formed from the elements of list. The number of cluster is determined
automatically.

FindClusters[list, k]

returns a list of k clusters formed from the elements of list.

FindClusters' automatic distance function detection supports scalars, numeric tensors, boolean vectors and
strings.

The Method option must be either “Agglomerate” or “Optimize”. If not specified, it defaults to “Optimize”.
Note that the Agglomerate and Optimize methods usually produce different clusterings.

The runtime of the Agglomerate method is quadratic in the number of clustered points n, builds the clustering
from the bottom up, and is exact (no element of randomness). The Optimize method's runtime is linear in n,
Optimize builds the clustering from top down, and uses random sampling.

ClusteringComponents
Nearest