ClusterClassify

ClusterClassify[data]

generates a ClassifierFunction[] by partitioning data into clusters of similar elements.

ClusterClassify[data,n]

generates a ClassifierFunction[] with n clusters.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Train the ClassifierFunction on some numerical data:

Use the classifier function to classify a new unlabeled example:

Obtain classification probabilities for this example:

Classify multiple examples:

Plot the probabilities for the two different classes in the interval {-5,5}:

Train the ClassifierFunction on some colors by requiring the number of classes to be 5:

Use the ClassifierFunction on some unlabeled data:

Gather the elements by their class number:

Train the ClassifierFunction on some strings:

Gather the elements by their class number:

Scope  (11)

Classify real numbers:

Classify vectors:

Classify Boolean vectors:

Use the classifier to assign clusters to a new Boolean True, False vector:

Use the classifier to assign clusters to a Boolean 1, 0 vector:

Look at their probabilities:

Classify images:

Use the classifier to cluster new images:

Classify 3D images:

Classify colors:

Classify strings:

Use the classifier to cluster new strings:

Classify heterogeneous data:

Classify times:

Use the classifier to cluster the data:

Classify random reals:

Look at the classifier information:

Get a description for the specific method used:

Generate random points in the plane and visualize them:

Classify the data:

Classify new random points in the place:

Visualize the resulting clustering:

Classify the same test data using IndeterminateThreshold:

Visualize the resulting clustering including the Indeterminate cluster:

Options  (10)

CriterionFunction  (1)

Generate some separated data and visualize it:

Construct a classifier function using the Automatic CriterionFunction:

Construct a classifier function using the CalinskiHarabasz index as CriterionFunction:

Compare the two clusterings of the data:

FeatureExtractor  (1)

Create a ClassifierFunction from a list of images and classify new examples:

Create a custom FeatureExtractor to extract features:

FeatureNames  (1)

Generate a classifier function and give a name to each feature:

Use the association format to assign cluster to a new example:

The list format can still be used:

FeatureTypes  (1)

Generate a classifier function assuming numerical and nominal feature types:

Generate a classifier function assuming nominal feature types instead:

Compare the result on new examples:

Method  (2)

Generate some data using uniform distributions:

Classify the data:

Use Information to obtain a method description:

Look at the clustered data:

Classify the data using k-means:

Look at the clustered data:

Generate a large dataset using multinormal distributions and visualize it:

Use ClusterClassify to find clusters by specifying the method to use and look at the AbsoluteTiming:

Look at the resulting clustering:

Use ClusterClassify to find clusters without specifying the method to use and look at the AbsoluteTiming:

MissingValueSynthesis  (1)

Generate a large dataset using multinormal distributions and visualize it:

Use ClusterClassify to find clusters:

Get the top cluster probabilities for a point with missing data:

Set the missing value synthesis to replace each missing variable with its estimated most likely value given known values (which is the default behavior):

Replace missing variables with random samples conditioned on known values:

Get the distribution of likely clusters for the point by replacing missing variables repeatedly with the random sampling strategy:

PerformanceGoal  (1)

Generate a uniformly distributed dataset and visualize it:

Obtain a classifier from this data, with an emphasis on training speed:

Assign clusters to some randomly generated data and look at the AbsoluteTiming:

Obtain a classifier from this data, with an emphasis on the speed:

Assign clusters to some randomly generated data and look at the AbsoluteTiming compared to the one above:

Visualize the two clusterings for the test data and note how the setting "TrainingSpeed" gives better results:

RandomSeeding  (1)

Train several classifiers on random colors:

Compute the classifiers on a new color and observe that the result is always the same:

Train several classifiers on the same colors by using different values of the RandomSeeding option:

Compute the classifiers on and observe how the classifier differs:

Weights  (1)

Generate some separated data containing outliers:

Clusterize the data:

Use the classifier function to classify the outlier together with another point:

Clusterize the data, adding a big weight on the outlier:

Use the classifier function to classify the same points:

Applications  (3)

Train several classifiers on a small, uniformly distributed dataset:

Divide a triangle into segments by using the classifiers on a large number of uniformly distributed random points:

Generate some normally distributed data:

Clusterize the data without specifying the number of classes:

Clusterize the data, specifying the number of classes:

Find dominant colors in an image:

Cluster the data given by the array of pixel values of the image:

Use the classifier to assign clusters to each pixel:

Use the classifier function to find four dominant colors:

Use the classifier to get binary masks for each dominant color:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_clusterclassify, organization={Wolfram Research}, title={ClusterClassify}, year={2020}, url={https://reference.wolfram.com/language/ref/ClusterClassify.html}, note=[Accessed: 17-December-2024 ]}