How to calculate Pearson correlation values of two columns in KNIME

I am quite new to KNIME. If I have a dataframe like:

Key   Old   New   cor
 A    30    40
 A    20    15
 B    25    30
 B    28    65
 B    11    19

And I would like to calculate the pearson correlation values of OLD and New these two columns which are grouped by Key. Could anyone teach me with this? Thanks for your time!

Hi @yurunsang

you need the linear correlation node for calculating this. It will output you the correlation matrix.

https://hub.knime.com/knime/nodes/Linear_Correlation*oluxz9j9RhfJY3E0

Best wishes, Iris

1 Like

Hi Iris,
Thanks for telling me this. However, I need it group by key so I need to know the correlation values of key A and key B individually. Could it be realised in ‘linear correlation’? Thanks.
Best regards,
Runsang