kfcm.m
来自「模糊核聚类算法的几篇论文及matlab源码」· M 代码 · 共 41 行
M
41 行
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 + =
减小字号Ctrl + -
显示快捷键?