All notes
Fcm
# Fuzzy C Means ## History The algorithm is developed by Dunn in 1973 and improved by Bezdek in 1981. ## Matlab version \todo machine generated chinese version. Matlab provides Fuzzy Logic Toolbox, in which _fcm_ is commonly used to do fuzzy c-means clustering. Its format is: [center, U, obj_fcn] = fcm(data, cluster_n, options) The documentation in Matlab says _U_ is the final fuzzy partition matrix (or member function matrix), but forgets to mention its format. Actually, _U_ is of dimension $(cluster_n sample_n)$, e.g. for 3-class clustering, *U* has 3 rows. I would like to comment also on the example in the documentation by Matlab: data = rand(100, 2); % Generate random sample of size (100, 2). [center,U,obj_fcn] = fcm(data, 2); % Do FCM, cluster into 2 groups. plot(data(:,1), data(:,2),'o'); % Plot the sample. maxU = max(U); % maxU is of size (1, 100). % OK, the following codes are to mark those sample points into the groups with higher belongingness. index1 = find(U(1,:) == maxU); index2 = find(U(2, :) == maxU); line(data(index1,1),data(index1, 2),'linestyle','none',... 'marker','*','color','g'); line(data(index2,1),data(index2, 2),'linestyle','none',... 'marker', '*','color','r'); \todo more knowledge on the *options*. options(1): exponent for the partition matrix U (default: 2.0) options(2): maximum number of iterations (default: 100) options(3): minimum amount of improvement (default: 1e-5) options(4): info display during iteration (default: 1) ## Compare to k-means ## Lang: cn