Feature suggestion: Linear Correlation node "Symmetrical output" option

Dear Knimers,

Consider the following table:
image

The output of the Linear correlation node looks like this:
image

How can I easily pick all the “Eagles” correlations? I could filter both the first and the second column and then concatenate them together, but then “Rabbits” and “Starbucks” names end up in different columns which makes life hard further down the line. To avoid this trouble, I very often end up doing this:
image

with the Column Rename node config:
image

Yielding:
image

Now I only need to filter the first column to get all the Eagle correlations, and the second column will contain all the correlation partners.

I therefore suggest to add an option “symmetrical output” to the Linear Correlation and Rank Correlation nodes.

(I know I could use a column filter on the correlation matrix, but that does not give me the p-value)

Best
Aswin

Hi @Aswin ,
thank you for your post. Based on how I understood what you want to obtain in the end I would suggest two ways for now, to make it easier:

  1. Either use Row Filter (Labs), which will allow you to set the AND condition for filtering, i.e. set to select rows containing Eagles in both columns.
  2. You can check out the Table Editor node, which makes it possible to manually edit your table in the interactive view.
    Hope it helps!
    Best,
    Daria

Dear @darspir

Your first suggestion is basically what i wrote in my suggestion: “I could filter both the first and the second column and then concatenate them together,” but then without the need for concatenation, which is nice. I would need OR though, not AND. There would never be a row with Eagles in both columns, I need rows with Eagles in either column.

However, it still means that the other correlation variable name is not in its own column, which makes life difficult in subsequent nodes. This is what I meant when I wrote: “but then “Rabbits” and “Starbucks” names end up in different columns which makes life hard further down the line.”

I don’t see how the table editor could help me here.

Best,
Aswin

Edited for missing words.

Hi @Aswin ,
it is a bit hard to understand the task and provide a solution without the WF at hand, so I could try it out myself. If the suggestion below do not help, please, upload your WF, if possible.

The Row Filter (Labs) also allows OR condition. I just gave you an example of what is possible and yes, indeed, you need an OR condition in this case :slight_smile:

With Table Editor node you could manually “swap” Rabbits and Eagles in the Row0. That should get you what you want to have: 3 rows with Eagles in one column, if I understood your goal correctly.

This is just a suggestion to make it easier for you for now, but maybe somebody provides a better idea.

Best,
Daria

Dear @darspir

I already have a solution to my problem, it is the one that I showed in my first post. It works fine. The purpose of my post was just to make a suggestion how the Linear Correlation node could be slightly changed to make its output more convenient to use.

I thought more KNIME users that work with the Linear Correlation node must have this issue, but I could be mistaken. Maybe I did not make my use-case clear enough.

It is not a big issue. I will simply continue to use the Linear Correlation node (and the Rank Correlation node) the way I presented in my first post. I post quite a lot of feature suggestions here, I do not expect all of them to be implemented.

I have anyway attached the workflow for completeness sake.

Thank you for your efforts!
Aswin

KNIME_project4.knwf (10.1 KB)

Hi @Aswin ,
sure, your feedback is in the voting process now but it might take a while. I just though to share with you the way I would go around it for now with a lesser amount of nodes to use :slight_smile:
Thanks for attaching the WF and have a nice day!
Best,
Daria

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.