关于分类器的有关程序,da1= [0.880138 0.763333 0.805714];da2= [0.742345 0.644615 0.848571];da3= [0.776414 0.673846 0.788571];da4= [0.747862 0.649231 0.782857];da5= [0.827034 0.717692 0.788571];da6= [0.750207 0.651282 0.785714];da7= [0.827034
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 09:41:54
关于分类器的有关程序,da1= [0.880138 0.763333 0.805714];da2= [0.742345 0.644615 0.848571];da3= [0.776414 0.673846 0.788571];da4= [0.747862 0.649231 0.782857];da5= [0.827034 0.717692 0.788571];da6= [0.750207 0.651282 0.785714];da7= [0.827034
关于分类器的有关程序,
da1= [0.880138 0.763333 0.805714];
da2= [0.742345 0.644615 0.848571];
da3= [0.776414 0.673846 0.788571];
da4= [0.747862 0.649231 0.782857];
da5= [0.827034 0.717692 0.788571];
da6= [0.750207 0.651282 0.785714];
da7= [0.827034 0.717692 0.800000];
da8= [0.892276 0.773846 0.814286];
da9= [0.891586 0.773333 0.831429];
da10= [0.928000 0.804615 0.948571];
da11= [0.714897 0.620769 0.825714];
da12= [0.819448 0.711026 0.717143];
da13= [0.793103 0.688205 0.711429];
da14= [0.719034 0.624359 0.722857];
da15= [0.739448 0.642051 0.751429];
da16= [0.931586 0.807692 0.822857];
da17= [0.854483 0.741282 0.848571];
da18= [0.705517 0.612821 0.7 ];
da19= [0.754069 0.654615 0.734286];
da20= [0.722897 0.627692 0.685714];
m=15;
c=3;
f=3;
g=5;
A=[da16 da17 da18 da19 da20]
B=[da1 da2 da3 da4 da5 da6 da7 da8 da9 da10 da11 da12 da13 da14 da15]
dist=zeros(g,m)
for k=1:g
for i=1:m
for j=1:f
dist(k,i)=[A(k,j)-B(i,j)]^2+dist(k,i)
end
end
end
关于分类器的有关程序,da1= [0.880138 0.763333 0.805714];da2= [0.742345 0.644615 0.848571];da3= [0.776414 0.673846 0.788571];da4= [0.747862 0.649231 0.782857];da5= [0.827034 0.717692 0.788571];da6= [0.750207 0.651282 0.785714];da7= [0.827034
da1= [0.880138 0.763333 0.805714];
da2= [0.742345 0.644615 0.848571];
da3= [0.776414 0.673846 0.788571];
da4= [0.747862 0.649231 0.782857];
da5= [0.827034 0.717692 0.788571];
da6= [0.750207 0.651282 0.785714];
da7= [0.827034 0.717692 0.800000];
da8= [0.892276 0.773846 0.814286];
da9= [0.891586 0.773333 0.831429];
da10= [0.928000 0.804615 0.948571];
da11= [0.714897 0.620769 0.825714];
da12= [0.819448 0.711026 0.717143];
da13= [0.793103 0.688205 0.711429];
da14= [0.719034 0.624359 0.722857];
da15= [0.739448 0.642051 0.751429];
da16= [0.931586 0.807692 0.822857];
da17= [0.854483 0.741282 0.848571];
da18= [0.705517 0.612821 0.7 ];
da19= [0.754069 0.654615 0.734286];
da20= [0.722897 0.627692 0.685714];
A=[da16' da17' da18' da19' da20'];
B=[da1' da2' da3' da4' da5' da6' da7' da8' da9' da10' da11' da12' da13' da14' da15'];
m=15;
g=5;
dist=zeros(g,m);
distsort=zeros(g,m);
index=zeros(g,m);
for i=1:g
for j=1:m
dist(i,j)=sum((A(:,i)-B(:,j)).^2);
end
[distsort(i,:) index(i,:)]=sort(dist(i,:));
end
有index中每行前三个数就能够判断它的类别!
祝你学习愉快!