Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Pearson Correlation with Group By

suresh_abeyweera
5 - Atom

Hello,
I have a sample csv file as below attached. For 1 user  has many records. In this case user 91 has 5 and user 135 has 4 records. I need to calculate the Pearson correlation among rating and my rating columns. Ideally my output should be like below, Need to find Value 1 and Value 2.

 

output.png

 


I noted that to get this output I need to use a batch macro. I tried using some of the community answers but was unable to figure it out. If someone can help me on this greatly appreciated. It could have been easier if the feature was in built in Pearson correlation tool. Just a suggestion.
Thank you.

 

3 REPLIES 3
phottovy
13 - Pulsar
13 - Pulsar

Hi @suresh_abeyweera 

I'd have to refresh my memory on the difference but you can use the Spearman Correlation tool with a group by. I will also put together a quick macro to get you the same results for the Pearson Correlation

phottovy
13 - Pulsar
13 - Pulsar

Here is the same workflow with a simple batch macro that gives you the results. I left it fairly basic but you could easily add options that let you select which columns to use.

suresh_abeyweera
5 - Atom

Thank you.

It seems that the correlation values from spearman and Pearson drastically change. May be I would like to think which to be used in my problem.(In recommendation System)...

Labels
Top Solution Authors