[centers,U,obj_fcn] = fcm(sod,5);
expo = 2.0;
max_iter = 100;
min_impro = 1e-6;
figure,
scatter3(sod1(:,1),sod1(:,2),sod1(:,3),'ob')
hold on
scatter3(sod2(:,1),sod2(:,2),sod2(:,3),'oc')
scatter3(sod3(:,1),sod3(:,2),sod3(:,3),'og')
scatter3(sod4(:,1),sod4(:,2),sod4(:,3),'or')
scatter3(sod5(:,1),sod5(:,2),sod5(:,3),'om')
scatter3(centers(1,1),centers(1,2),centers(1,3),'xb','Sizedata',100,'LineWidth',3)
scatter3(centers(2,1),centers(2,2),centers(2,3),'xc','Sizedata',100,'LineWidth',3)
scatter3(centers(3,1),centers(3,2),centers(3,3),'xg','Sizedata',100,'LineWidth',3)
scatter3(centers(4,1),centers(4,2),centers(4,3),'xr','Sizedata',100,'LineWidth',3)
scatter3(centers(5,1),centers(5,2),centers(5,3),'xm','Sizedata',100,'LineWidth',3)
legend('P.1','P.2','P.3','P.4','P.5','P.1 center','P.2 center','P.3 center','P.4 center','P.5 center')
hold off
title 'Fuzzy C Mean';
view(3), axis vis3d, box on, rotate3d on
xlim ([0 10])
ylim ([0 10])
zlim ([0 10])
xlabel('Severity')
ylabel('Occurrence')
zlabel('Detect')
Центроиды нечеткой кластеризации c-mean отличаются, как только я запускаю код каждый раз. Есть ли что-то неправильное?
Sod1 - sod5 - часть данных sod, я извлекаю их в части