Main Content

Adjust Fuzzy Overlap in Fuzzy C-Means Clustering

This example shows how to adjust the amount of fuzzy overlap when performing fuzzy c-means clustering.

Create a random data set. For reproducibility, initialize the random number generator to its default value.

data = rand(100,2);

Specify fuzzy partition matrix exponents.

M = [1.1 2.0 3.0 4.0];

The exponent values in M must be greater than 1, with smaller values specifying a lower degree of fuzzy overlap. In other words, as M approaches 1, the boundaries between the clusters become more crisp.

For each overlap exponent:

  • Cluster the data.

  • Classify each data point into the cluster for which it has the highest degree of membership.

  • Find the data points with maximum membership values below 0.6. These points have a more fuzzy classification.

  • To quantify the degree of fuzzy overlap, calculate the average maximum membership value across all data points. A higher average maximum membership value indicates that there is less fuzzy overlap.

  • Plot the clustering results.

for i = 1:4
    % Cluster the data.
    options = [M(i) NaN NaN 0];
    [centers,U] = fcm(data,2,options);
    % Classify the data points.
    maxU = max(U);
    index1 = find(U(1,:) == maxU);
    index2 = find(U(2,:) == maxU);
    % Find data points with lower maximum membership values.
    index3 = find(maxU < 0.6);
    % Calculate the average maximum membership value.
    averageMax = mean(maxU);
    % Plot the results.
    hold on
    hold off
    title(['M = ' num2str(M(i)) ', Ave. Max. = ' num2str(averageMax,3)])

Figure contains 4 axes objects. Axes object 1 with title M = 1.1, Ave. Max. = 0.981 contains 5 objects of type line. Axes object 2 with title M = 2, Ave. Max. = 0.791 contains 5 objects of type line. Axes object 3 with title M = 3, Ave. Max. = 0.677 contains 5 objects of type line. Axes object 4 with title M = 4, Ave. Max. = 0.62 contains 5 objects of type line.

A given data point is classified into the cluster for which it has the highest membership value, as indicated by maxU. A maximum membership value of 0.5 indicates that the point belongs to both clusters equally. The data points marked with a black x have maximum membership values below 0.6. These points have a greater degree of uncertainty in their cluster membership.

More data points with low maximum membership values indicate a greater degree of fuzzy overlap in the clustering result. The average maximum membership value, averageMax, provides a quantitative description of the overlap. An averageMax value of 1 indicates crisp clusters, with smaller values indicating more overlap.

See Also

Related Topics