function ac=centroid(data_test,data_train,label_train,label_test)
         [~,N_test] = size(data_test);
         predicted_label = zeros(1,N_test);
         for i = 1:N_test
             predicted_label(i) = belongto(data_test(:,i),data_train,label_train);
         end
prelabel = predicted_label;
good = eq(prelabel,label_test);
N = size(label_test,2);
ac=sum(good)/N;
end