필터 지우기
필터 지우기

Faster Kendall correlation calcuation

조회 수: 2 (최근 30일)
Jon
Jon 2018년 1월 19일
편집: Jon 2018년 1월 19일
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?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by