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
Number of clusters to create, specified as
"auto" or an integer
fcm function computes two clusters.
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.
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.
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.
|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