LSHtry.m 494 B

123456789101112131415161718192021222324
  1. clear all
  2. close all
  3. clc
  4. ll=16;
  5. kk=20;
  6. addpath('../Functions');
  7. addpath('./Functions');
  8. XSetMat=double(fvecs_read('../Data/sift/sift_base.fvecs'));
  9. if(1)
  10. XSetTable=lsh('e2lsh',ll,kk,size(XSetMat,1),XSetMat,'range',255,'w',-4);
  11. save(sprintf('./Data/XSetTableL%.0fk%.0f.mat',ll,kk),'XSetTable');
  12. else
  13. load(sprintf('./Data/XSetTableL%.0fk%.0f.mat',ll,kk));
  14. end
  15. YSetMat=double(fvecs_read('../Data/sift/sift_base.fvecs'));
  16. [mi,ma,me]=lshstats(XSetTable,'test',XSetMat,YSetMat,2);