FCM Code in MATLAB

FCM Code in MATLAB thumbnail
MATLAB implements fuzzy c-means clustering.

MATLAB is an industry-standard software package for analysis of a variety of technical and scientific data. An underlying goal of many analytical methods is to recognize patterns in the underlying data. Often this involves dividing data into distinct groups or clusters. One frequently-used clustering algorithm is fuzzy c-means clustering, developed by Dunn in 1973 and improved by Bezdek in 1981.

  1. Overview

    • In fuzzy c-means clustering, or FCM, data points can belong to more than one cluster. An iterative algorithm minimizes an objective function to find the optimum cluster membership for each point in the data being clustered. Iteration of the clustering algorithm will stop when the objective function reaches a local minimum or saddle point. FCM can be combined with other search algorithms in order to ensure an optimum result.

    Objective Function

    • The FCM objective function J_m is equal to:

      sum(i=1...N)[ sum(j=1...C) [u_ij^m norm(x_i - c_j)^2 ] ]

      The objective function is considered over real values of m between 1 and positive infinity. The value u_ij is the membership of the data point x_i in the jth cluster, centered at c_j.

    Algorithm

    • The FCM optimization algorithm has four steps:

      1. Initialize the matrix U_0 = [u_ij].
      2. Calculate the cluster centers C_k = [c_j] from U_k, where k is an integer equal iteration of the algorithm.
      3. Update U_(k+1) from the new C_k.
      4. Calculate the value of J_k. If the new stop caused J_k to increase, stop, otherwise return to step 2.

    MATLAB Use

    • MATLAB implements fuzzy c-means clustering in the fcm() function. The Fuzzy Logic toolbox is required for use of the fcm() function. The calling syntax is:

      [centers, U, objFun] = fcm(my_data, n_clusters);

      The my_data variable is the input data, where each row represents a data point. The n_clusters variable is the number of clusters to group the data into. The centers output is the matrix of optimum cluster centers. U is the optimum fuzzy partition or membership matrix. The objFun variable is the final value of the objective function.

Related Searches:

References

  • Photo Credit Jupiterimages/Pixland/Getty Images

Comments

Related Ads

Featured