Contenuto principale

fcmOptions

FCM clustering options

Since R2023a

    Description

    Use an fcmOptions object to specify options for clustering data using the fcm function. You can specify options such as the number of clusters, the clustering exponent, and the distance metric.

    Creation

    Description

    opt = fcmOptions returns a default option object for clustering using fcm. To modify options, use dot notation.

    example

    opt = fcmOptions(PropertyName=Value) specifies options using one or more name-value arguments. For example, opt = fcmOptions(NumClusters=3) creates an fcmOptions object and sets the number of clusters to 3.

    Properties

    expand all

    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 NumClusters.

    When NumClusters is "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 info output argument of fcm.

    Dependencies

    • If NumClusters is a scalar integer, it must equal the number of rows in ClusterCenters.

    • If NumClusters is a vector, the minimum number of clusters must equal the number of rows in ClusterCenters.

    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.

    Maximum number of iterations, specified as a positive integer.

    Minimum improvement in objective function between two consecutive iterations, specified as a positive scalar. When the objective function improves by an amount less than MinImprovement the FCM algorithm stops.

    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)

    Since R2026a

    Cluster membership type, specified as one of these values:

    • "probabilistic" — For a given data point, the sum of membership values across all clusters is equal to 1. This means that the membership values are interpreted as probabilities, indicating the likelihood that a data point belongs to each cluster.

    • "possibilistic" — For a given data point, the sum of membership values across all clusters is not constrained to be 1. Instead, each membership value is independent, reflecting the degree of possibility rather than probability.

    Since R2026a

    Initial fuzzy partition matrix, specified as an Nc-by-Nd matrix, where Nc is the number of clusters and Nd is the number of data points. Element U(i,j) indicates the degree of membership μij of the jth data point in the ith cluster.

    When PartitionMatrix is empty, the FCM algorithm randomly initializes the partition matrix values.

    Dependencies

    • When ClusterMembershipType is "probabilistic", the sum of the membership values for each cluster must be one; that is, the sum of each column of PartitionMatrix must be one.

    • PartitionMatrix must have the same number of rows as ClusterCenters.

    Since R2023b

    Initial cluster centers, specified as a Nc-by-Nf matrix, where Nc is the number of clusters and Nf is the number of data features.

    When ClusterCenters is empty, the FCM algorithm derives the initial cluster centers based on the initial partition matrix.

    Dependencies

    ClusterCenters must have the same number of rows as PartitionMatrix.

    Since R2026a

    Option to display cluster plot after each clustering iteration, specified as one of these values:

    • true — Display cluster plot.

    • false — Do not display cluster plot.

    Option to display objective function for each iteration, specified as one of these values:

    • true — Display objective function.

    • false — Do not display objective function.

    Object Functions

    fcmFuzzy c-means clustering

    Examples

    collapse all

    Create an 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;

    Version History

    Introduced in R2023a

    expand all