12345678910111213141516171819202122232425262728293031323334353637 |
- clear all
- close all
- clc
- kk=2.^[1:12];
- rat=[1 2 5 10 20 50 100];
- mm=[4 7 16];
- %kk=2048;
- %mm=[8 16];
- nRecall=100;
- %%
- for ii=1:length(mm)
- for jj=1:length(kk)
- [Performances(jj,ii,:) normCCostADC(jj,ii), ~] = PQNNSwithADC( kk(jj), mm(ii), nRecall, [0 0 0 0 1])
- end
- end
- %%
- for jj=1:length(mm)
- figure
- for rr=1:length(rat)
- plot(normCCostADC(:,jj),Performances(:,jj,rr),'-x'), hold on
- end
- for ii=1:length(kk)
- text(normCCostADC(ii,jj)+2e-5,Performances(ii,jj,1)-.01,sprintf('$k=%d$',kk(ii)),'interpreter','latex');
- end
- h=legend('recall@1','recall@2','recall@5','recall@10','recall@20','recall@50','recall@100');
- set(h,'Interpreter','latex');
- grid on; grid minor;
- title(sprintf('Product Quantization with ADC - $m=%d$',mm(jj)),'interpreter','latex');
- xlabel('Computational Cost (scaled to Exhaustive one)','interpreter','latex');
- ylabel('$\eta_r$','interpreter','latex');
- end
- %%
|