% % % %C = rand(10000, 2); % Corpus %Q = rand(10000, 2); % Queries C = rand(20000, 2); % Δύο clusters Q = C; %Q = rand(10000, 2); % Queries κοντά στο μέσο k = 100; % Number of neighbors m = 100; % Max candidates per query global count; count =0; tic; [pi, pd] = recursiveKNN(C, Q, k, m); toc count tic; [si, sd] = knnsearch(C, Q, 'k', k); toc [a,b] = size(si); all_neighbors = a*b accuracy = 1 - nnz(si-pi)/all_neighbors false_neighbors = nnz(sd-pd)