1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| clear all ;
clc ;
Base=load('Iris.dat');
RealLabel=double(Base(:,end));%
R=load('RACOClass-Iris.mat','MatFoundLabel','numberOfCycle','patterns','RealLabel');
data=R.patterns;
Nt=R.numberOfCycle;
Mr=R.MatFoundLabel;
FoundLabel=Mr(end,:);
FoundLabel=FoundLabel';
FoundLabelWithOutZeros=[];
for i=1:length(FoundLabel)
if(FoundLabel(i,1)~=0 )
FoundLabelWithOutZeros=[FoundLabelWithOutZeros ;FoundLabel(i,1)];
end
end
ind=find( FoundLabel)
for i=1:length(ind)
NewData(i,:)= data(ind(i),:)
end
eva = evalclusters(NewData,FoundLabelWithOutZeros,'CalinskiHarabasz')
figure;
plot(eva) |
Partager