AUTH's THMMY "Parallel and distributed systems" course assignments.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

24 rindas
498 B

  1. %
  2. %
  3. %
  4. %C = rand(10000, 2); % Corpus
  5. %Q = rand(10000, 2); % Queries
  6. C = rand(20000, 2); % Δύο clusters
  7. Q = C;
  8. %Q = rand(10000, 2); % Queries κοντά στο μέσο
  9. k = 100; % Number of neighbors
  10. m = 100; % Max candidates per query
  11. global count;
  12. count =0;
  13. tic; [pi, pd] = recursiveKNN(C, Q, k, m); toc
  14. count
  15. tic; [si, sd] = knnsearch(C, Q, 'k', k); toc
  16. [a,b] = size(si);
  17. all_neighbors = a*b
  18. accuracy = 1 - nnz(si-pi)/all_neighbors
  19. false_neighbors = nnz(sd-pd)