Wolfram Computation Meets Knowledge

Wolfram Language & System Documentation Center Wolfram Language Home Page »

FindClusters

FindClusters[{e1,e2,…}]

partitions the ei into clusters of similar elements.

FindClusters[{e1v1,e2v2,…}]

returns the vi corresponding to the ei in each cluster.

FindClusters[data,n]

partitions data into n clusters.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Find clusters of nearby values:

Find exactly four clusters:

Represent clustered elements with the right-hand sides of each rule:

Represent clustered elements with the keys of the association:

Scope  (6)

Cluster vectors of real values:

Cluster data of any precision:

Cluster Boolean True, False data:

Cluster colors:

Cluster images:

Clustering of 3D images:

Options  (15)

CriterionFunction  (1)

Generate some separated data and visualize it:

Cluster the data using different settings for CriterionFunction:

Compare the two clusterings of the data:

DistanceFunction  (4)

Use CanberraDistance as the measure of distance for continuous data:

Clusters obtained with the default SquaredEuclideanDistance:

Use DiceDissimilarity as the measure of distance for Boolean data:

Use MatchingDissimilarity as the measure of distance for Boolean data:

Use HammingDistance as the measure of distance for string data:

Define a distance function as a pure function:

FeatureExtractor  (1)

Find clusters for a list of images:

Create a custom FeatureExtractor to extract features:

FeatureNames  (1)

Use FeatureNames to name features, and refer to their names in further specifications:

FeatureTypes  (1)

Use FeatureTypes to enforce the interpretation of the features:

Compare it to the result obtained by assuming nominal features:

Method  (4)

Cluster the data hierarchically:

Clusters obtained with the default method:

Generate normally distributed data and visualize it:

Cluster the data in 4 clusters by using the k-means method:

Cluster the data using the "GaussianMixture" method without specifying the number of clusters:

Generate some uniformly distributed data:

Cluster the data in 2 clusters by using the k-means method:

Cluster the data using the "DBSCAN" method without specifying the number of clusters:

Generate a list of colors:

Cluster the colors in 5 clusters using the k-medoids method:

Cluster the colors without specifying the number of clusters using the "MeanShift" method:

Cluster the colors without specifying the number of clusters using the "NeighborhoodContraction" method:

Cluster the colors using the "NeighborhoodContraction" method and its suboptions:

PerformanceGoal  (1)

Generate 500 random numerical vectors of length 1000:

Compute their clustering and benchmark the operation:

Perform the same operation with PerformanceGoal set to "Speed":

RandomSeeding  (1)

Generate 500 random numerical vectors in two dimensions:

Compute their clustering several times and compare the results:

Compute their clustering several times by changing the RandomSeeding option, and compare the results:

Weights  (1)

Obtain cluster assignment for some numerical data:

Look at the cluster assignment when changing the weight given to each number:

Applications  (3)

Find and visualize clusters in bivariate data:

Find clusters in five‐dimensional vectors:

Cluster genomic sequences based on the number of element‐wise differences:

Properties & Relations  (2)

FindClusters returns the list of clusters, while ClusteringComponents gives an array of cluster indices:

FindClusters groups data, while Nearest gives the elements closest to a given value:

Neat Examples  (2)

Divide a square into n segments by clustering uniformly distributed random points:

Cluster words beginning with "agg" in the English dictionary:

Wolfram Research (2007), FindClusters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindClusters.html (updated 2020).

Text

Wolfram Research (2007), FindClusters, Wolfram Language function, https://reference.wolfram.com/language/ref/FindClusters.html (updated 2020).

CMS

Wolfram Language. 2007. "FindClusters." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/FindClusters.html.

APA

Wolfram Language. (2007). FindClusters. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindClusters.html

BibTeX

@misc{reference.wolfram_2024_findclusters, author="Wolfram Research", title="{FindClusters}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/FindClusters.html}", note=[Accessed: 18-May-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_findclusters, organization={Wolfram Research}, title={FindClusters}, year={2020}, url={https://reference.wolfram.com/language/ref/FindClusters.html}, note=[Accessed: 18-May-2024 ]}

Top