FCM clustering options
fcmOptions object to specify options for clustering data
fcm function. You can specify options such as the
number of clusters, the clustering exponent, and the distance metric.
returns a default option
object for FCM clustering.
opt = fcmOptions
specifies options using one or more name-value pair arguments. For example, to compute
three clusters, use
opt = fcmOptions(
NumClusters — Number of clusters
"auto" (default) | integer greater than
1 | vector of integers
Number of clusters to create, C, specified as one of the following:
"auto"— Cluster the data ten times (C = 2 through 11)
Integer greater than
1— Cluster the data once using the specified number of clusters.
Vector of integers greater than
1— Cluster the data multiple times, once for each value in
"auto" or a vector, the
fcm function returns cluster centers for the optimal number of
clusters, which it determines using a validity index. You can return the clustering
results for the other values of C using the
output argument of
Exponent — Exponent for fuzzy partition matrix
2.0 (default) | scalar greater than
Exponent for the fuzzy partition matrix, specified as a scalar greater than
1.0. This option controls the amount of fuzzy overlap between
clusters, with larger values indicating a greater degree of overlap.
If your data set is wide with significant overlap between potential clusters, then the calculated cluster centers can be very close to each other. In this case, each data point has approximately the same degree of membership in all clusters. To improve your clustering results, decrease this value, which limits the amount of fuzzy overlap during clustering.
For an example of fuzzy overlap adjustment, see Adjust Fuzzy Overlap in Fuzzy C-Means Clustering.
MaxNumIteration — Maximum number of iterations
100 (default) | positive integer
Maximum number of iterations, specified as a positive integer.
MinImprovement — Minimum improvement in objective function
1e-5 (default) | positive scalar
Minimum improvement in objective function between two consecutive iterations, specified as a positive scalar.
DistanceMetric — Method for computing distance
"euclidean" (default) |
Method for computing distance between data points and cluster centers, specified as one of the following values.
"euclidean"— Compute distance using a Euclidean distance metric, which corresponds to the classical FCM algorithm.
"mahalanobis"— Compute distance using a Mahalanobis distance metric, which corresponds to the Gustafson-Kessel FCM algorithm.
"fmle"— Compute distance using fuzzy maximum likelihood estimation (FMLE), which corresponds to the Gath-Geva FCM algorithm. (since R2023b)
ClusterCenters — Initial cluster centers
 (default) | matrix
Initial cluster centers, specified as an C-by-N matrix, where C is the number of clusters and N is the number of data features.
ClusterCenters is empty, the FCM algorithm randomly initializes the cluster center values.
Verbose — Information display flag
true (default) |
Information display flag indicating whether to display the objective function value after each iteration, specified as one of the following values.
true— Display objective function.
false— Do not display objective function.
|Fuzzy c-means clustering|
Specify Options for FCM Clustering
fcmOptions object for computing three clusters using a maximum of 200 iterations.
opt = fcmOptions(... NumClusters=3,... MaxNumIteration=200);
You can also specify options using dot notation. For example, disable the command-window output of the objective function value for each FCM iteration.
opt.Verbose = false;
Introduced in R2023a