You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importnumpyasnpimportpandasaspddf=pd.DataFrame(np.random.randn(1000, 300))
#Using Spearman method: On my computer about 12.19 secondsdf.corr(method='spearman')
#Using detour: On my computer about 0.72 secondsrank_df=df.rank()
rank_df.corr(method='pearson')
Problem description
I found that when I calculate Spearman correlation via the detour method it's way faster. The output (correlation coefficients) differs slightly (minimal) when using data containing nan-values. I'd like to understand this difference in output, and maybe the Spearman method can be faster by re-using the current Pearson implementation or something.
The text was updated successfully, but these errors were encountered:
Code Sample
Problem description
I found that when I calculate Spearman correlation via the detour method it's way faster. The output (correlation coefficients) differs slightly (minimal) when using data containing nan-values. I'd like to understand this difference in output, and maybe the Spearman method can be faster by re-using the current Pearson implementation or something.
The text was updated successfully, but these errors were encountered: