Main Content

findcluster

(Not recommended)Open clustering tool

findcluster is not recommended. Use the FCM Data Clustering Live Editor Task instead.

Description

findcluster opens a UI to implement either fuzzy c-means or fuzzy subtractive clustering.

findcluster(fileName) opens the UI, loads the data set in the file specified by fileName, and plots the first two dimensions of the data.

example

Examples

collapse all

Using the Clustering tool, you can cluster data using fuzzy c-means or subtractive clustering.

To open the Clustering tool, at the MATLAB® command line, type:

findcluster

By default, the Clustering tool shows an empty plot on the left, clustering options on the right, and a button for loading data in the top right corner.

To load a data set, perform either of the following actions:

  • Click Load Data, and select the file containing the data.

  • Open the Clustering Tool with a data set directly by calling findcluster with the data set as an input argument.

    For example, enter:

    findcluster('clusterdemo.dat')

The data set file must have the extension .dat. Each line of the data set file contains one data point. For example, if you have 5-dimensional data with 100 data points, the file contains 100 lines, and each line contains five values.

The Clustering tool works on multidimensional data sets, but displays only two of those dimensions on the plot. To select other dimensions in the data set for plotting, use the X-axis and Y-axis lists.

To start clustering the data:

  1. Choose the clustering function fcm (fuzzy C-Means clustering) or subtractiv (subtractive clustering) from the menu under Methods.

  2. Set options for:

    • Fuzzy c-means clustering using the Cluster Num, Max Iteration, Min, and Exponent fields. For information on these options, see fcm.

    • Subtractive clustering using the Influence Range, Squash, Aspect Ratio, and Reject Ratio fields. To use a different influence range for each data column, specify Influence Range as a vector with the number of elements equal to the number of columns. For information on these options, see subclust.

  3. Cluster the data by clicking Start.

    Once the clustering is complete, the cluster centers appear in black.

    The clustering tool shows a two-dimensional plot of the data points in red with cluster centers in black. Change the X and Y axis data using the lists below the plot.

Using the Clustering tool, you can obtain only the computed cluster centers. To obtain additional information for:

  • Fuzzy c-means clustering, such as the fuzzy partition matrix, cluster the data using fcm.

  • Subtractive clustering, such as the range of influence in each data dimension, cluster the data using subclust.

To use the same clustering data with either fcm or subclust, first load the data file into the MATLAB workspace. For example, at the MATLAB command line, type:

load clusterdemo.dat

Input Arguments

collapse all

Data file name, specified as a string or character vector.

The data set file must have the extension .dat. Each line of the data set file contains one data point. For example, if you have 5-dimensional data with 100 data points, the file contains 100 lines, and each line contains five values.

Tips

  • Using the Clustering tool, you can obtain only the computed cluster centers. To obtain additional information for:

    • Fuzzy c-means clustering, such as the fuzzy partition matrix, cluster the data using fcm.

    • Subtractive clustering, such as the range of influence in each data dimension, cluster the data using subclust.

  • To use the same clustering data with either fcm or subclust, first load the data file into the MATLAB workspace. For example, at the MATLAB command line, type:

    load clusterdemo.dat

Version History

Introduced before R2006a

expand all