It always remains the same, irrespective of the choice of categorical encoding. This is because the Spearman correlation is rank-based.
Different ordinal encodings result in the same Spearman correlation
It operates on the ranks of the data, which makes it more suitable for such cases of correlation analysis.
Both ordinal encodings have the same rank
👉 Over to you: What are some other measures to determine the correlation between categorical data and continuous data?
Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (550+ pages) with 320+ tips.
👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.
Thanks for reading!
Latest full articles
If you’re not a full subscriber, here’s what you missed last month: