Effacer les filtres
Effacer les filtres

Faster Kendall correlation calcuation

2 vues (au cours des 30 derniers jours)
Jon
Jon le 19 Jan 2018
Modifié(e) : Jon le 19 Jan 2018
I need to do billions of Kendall correlations (yes, billions thank the gods for supercomputers) so I would like to make the correlation function faster for my particular needs. I have already cut down MATLAB's base version from about 0.062 seconds to 0.043 seconds (for a vector with just over 3000 elements) and made it compatible for use within parfor loops by removing the recursion (by having the perm function call perm1 which calls perm2 up to 9 which it never gets to). 0.03 seconds of this time is a single line for loop
K = 0;
for k = 1:n-1
K = K + sum(sign(xrank(k)-xrank(k+1:n)).*sign(yrank(k)-yrank(k+1:n)));
end
Is there a way to make this part faster that perhaps sacrifices memory instead of time for instance?

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by