RunPQNNSwithADC.m~ 872 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. clear all
  2. close all
  3. clc
  4. kk=[16 64 256 1024 2048];
  5. rat=[1 2 5 10 20 50 100];
  6. mm=[8 16];
  7. %kk=2048;
  8. %mm=[8 16];
  9. nRecall=100;
  10. %%
  11. for ii=1:length(mm)
  12. for jj=1:length(kk)
  13. [Performances(jj,ii,:) normCCostADC(jj,ii), ~, ~] = PQNNSwithADC( kk(jj), mm(ii), nRecall, [0 0 0 0 1])
  14. end
  15. end
  16. %%
  17. for jj=1:length(mm)
  18. figure
  19. for ii=1:length(kk)
  20. for
  21. plot(normCCostADC(ii,jj),Performances(ii,jj,:),'-x'), hold on
  22. end
  23. for ii=1:length(kk)
  24. text(normCCostADC(ii,:)+2e-5,Performances(ii,:,jj),sprintf('k=%d',kk(ii)),'interpreter','latex');
  25. end
  26. h=legend('R@1','R@2','R@5','R@10','R@20','R@50','R@100');
  27. set(h,'Interpreter','latex');
  28. grid on; grid minor;
  29. title('ANNS with ADC - $m=8$','interpreter','latex');
  30. xlabel('Complexity (scaled to Exhaustive NNS)','interpreter','latex');
  31. ylabel('Performances','interpreter','latex');
  32. end
  33. %%
  34. figure
  35. plot(Performances(1,1,:))