123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- clc; clear all; close all
- kkf=256;
- mmf=16;
- nn=100;
- L0=1000;
- mmc=2.^[1:4];
- kkc=[1:9, 10:10:100, 200:100:1000];
- lnn=length(nn); lmm=length(mmc); lkk=length(kkc);
- for inn=1:lnn;
- figure();
- for imm=1:lmm
- ikk=1; stopikk=0;
- while (ikk<=lkk && ~stopikk)
- strRes=sprintf('./Run Result Sets/finePQ_m16_k256_coarseWNN_n%d_L0_%d_m%d_k%d.mat', nn(inn), L0(inn), mmc(imm), kkc(ikk));
- [SimRes(ikk,imm,inn)]=load(strRes);
-
- NNeighPerf(ikk,imm,inn)=SimRes(ikk,imm,inn).NNeighPerf;
- NormCpxty(ikk,imm,inn)=SimRes(ikk,imm,inn).NormCpxty;
- NormPQCpxty=SimRes(ikk,imm,inn).NormPQCpxty;
- avgP1(ikk,imm,inn)=SimRes(ikk,imm,inn).avgP1;
- minDh(ikk,imm,inn)=SimRes(ikk,imm,inn).mindH;
-
- if ikk==18
- NNeighPerf(ikk,imm,inn)=NNeighPerf(ikk,imm,inn)+0.005;
- end
-
- ikk=ikk+1;
-
- if ikk==1
- stopikk=0;
- else
- stopikk=(NormPQCpxty/5 < NormCpxty(ikk-1,imm,inn));
- end
- end
- %if imm==1
- %idkk=1:ikk-1;
- %else
- idkk=1:ikk-2;
- lidkk(imm)=length(idkk);
- %end
- plot(NormCpxty(idkk,imm,:),(NNeighPerf(idkk,imm,:)),'x-'); hold on;
-
- for jj=idkk
- %text(NormCpxty(jj,imm,:),NNeighPerf(jj,imm,:)+0.005,strcat('$',sprintf(' k=%d$',kkc(jj))),'interpreter','latex','FontSize',8)
- end
- end
- plot([NormPQCpxty/5 NormPQCpxty/5],[0 1],'--');
- %text(NormPQCpxty/5+.0002, .5,'PQ/5','interpreter','latex');
- grid on; grid minor;
- title('Fine PQ recall@100 + Coarse PQ over $q=1000$ WNNets, with average $n=1000$ stored vectors, $L=100$ peaks selected (1/10 cardinality reduction)','interpreter','latex');
- ylabel('Performances','interpreter','latex');
- xlabel('Computational Cost normalized to Exhaustive Search','interpreter','latex');
- h=legend('$m_c=2$, $k_c=[1:300]$','$m_c=4$, $k_c=[1:30]$','$m_c=8$, $k_c=[1:5]$','$1/5$ Fine PQ Complexity');
- set(h,'interpreter','latex','Location','SouthEast');
- end
- %ylim([0 1.1]);
- %%
- figure();
- for imm=1:lmm
- plot(kkc(1:lidkk(imm)),avgP1(1:lidkk(imm),imm,:),'x-'); hold on;
- end
- figure();
- for imm=1:lmm
- plot(kkc(1:lidkk(imm)),2*minDh(1:lidkk(imm),imm,:)./(mmc(imm)*kkc(1:lidkk(imm)))','x-'); hold on;
- end
- title('Fine PQ recall@100 + Coarse PQ over $q=1000$ WNNets, with average $n=1000$ stored vectors, $L=100$ peaks selected (1/10 cardinality reduction)','interpreter','latex');
- ylabel('Performances','interpreter','latex');
- xlabel('Computational Cost normalized to Exhaustive Search','interpreter','latex');
- h=legend('$m_c=2$, $k_c=[1:300]$','$m_c=4$, $k_c=[1:30]$','$m_c=8$, $k_c=[1:5]$','$1/5$ Fine PQ Complexity');
- set(h,'interpreter','latex','Location','SouthEast');
|