📄 kfcm.m
字号:
function [u,v]=kfcm(data,c)
% KFCM
% 变量说明
% x : 数据点
% v :聚类中心
% fix c,tmax, m and delt
% c=5;% the number od clusters
tmax=50;
delt=0.001;% the number of data points
m=2; % the quantity controlling clustering fuzziness
tempM=size(data);
n=tempM(2);
u0=initU(c,n);
V=InitClusterCenter(u0,data,n,m,c);
X=data;
for t=1:tmax
V=UpdateVi_Eq6(u0,V,X,c,m);
u1=updateU_Eq5(X,V,m,c);
u2=u1-u0;
Et=max(max(abs(u2)));
if Et<delt
break
else
u0=u1;
end
end
v=V;
u=u1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -