Filter löschen
Filter löschen

Faster Kendall correlation calcuation

2 Ansichten (letzte 30 Tage)
Jon
Jon am 19 Jan. 2018
Bearbeitet: Jon am 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?

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by