KaveIO / PhiK

Phi_K correlation analyzer library
Other
156 stars 28 forks source link

[QUESTION] Correlation direction #59

Closed jultou-raa closed 2 years ago

jultou-raa commented 2 years ago

Hi !

Thanks for the work here !

I have a quick question : $\phi_K$ does not give a direction to the correlation (because it's ranges between 0 and 1).

In case of a correlation computed between ordinal variables. Do you think we can retreive properly the direction by using the sign of the Kendall-Tau correlation ? Or is-it a non sense ?

Thank you for your help !

mbaak commented 2 years ago

Indeed phi_k does not have a sign. (For any two features, it is independent of the ordering of the values of any feature. That makes the sign undefined.) But if the ordering of both features is fixed then the sign is easy to evaluate. Indeed you can use Pearson or Kendall-Tau. Or use the simple rule of thump: if one feature goes up and the other does as well, the correlation is positive. If the other goes down, the correlation is negative. Hope that helps!

jultou-raa commented 2 years ago

Hi @mbaak.

Thank you for the answer, I close the question right now :)