fcm - Fuzzy c-means clustering

Syntax

[center,U,obj_fcn] = fcm(data,cluster_n) 

Description

[center, U, obj_fcn] = fcm(data, cluster_n) applies the fuzzy c-means clustering method to a given data set.

The input arguments of this function are

The output arguments of this function are

fcm(data,cluster_n,options) uses an additional argument variable, options, to control clustering parameters, introduce a stopping criteria, set the iteration information display, or both.

If any entry of options is NaN, the default value for that option is used instead. The clustering process stops when the maximum number of iterations is reached or when the objective function improvement between two consecutive iterations is less than the minimum amount of improvement specified.

Examples

data = rand(100, 2);
[center,U,obj_fcn] = fcm(data, 2);
plot(data(:,1), data(:,2),'o');
maxU = max(U);
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');
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS