基于GRNN广义回归神经网络的数据分类和基于FCM数据分类对比并输出混淆矩阵评价指标.,matlab2021a运行测试
%% 模糊聚类
data=P1;
[center,U,obj_fcn] = fcm(data,5);
for i=1:R1
[value,idx]=max(U(:,i));
a1(i)=idx;
end
%% 模糊聚类结果分析
Confusion_Matrix_FCM=zeros(6,6);
Confusion_Matrix_FCM(1,:)=[0:5];
Confusion_Matrix_FCM(:,1)=[0:5]';
for nf=1:5
for nc=1:5
Confusion_Matrix_FCM(nf+1,nc+1)=length(find(a1(find(T1==nf))==nc));
end
end