Normalize rows by average row

Hello,
I think this is a similar question than

So basically I have computed an average row from a table using the group-by node and I would like to divide every row in the initial table by this average row.

Currently I turn the average row into a set of flow variables and I normalize each column one by one using the corresponding flow variable but I was wondering if there is something more straightforward.
I could use a python node with pandas but I would like a pure KNIME solution.

Hi @l.thomas,

Could you please provide an example data set and your desired output?

:blush:

You can try $$CURRENT_COLUMN$$/COL_MEAN($$CURRENT_COLUMN$$) expression in

2 Likes

Nice solution for a full dataset normalisation, in my case however I need to divide by the mean for a sub-group of the table (the controls).
So I have on one hand, my “average control row”, and on the other hand a table for the other samples with the same column header, and for which I want to divide each row by the “average control row”.

@armingrudd Below my current solution, which does not scale very well for the normalisation step.
The more columns to normalize the more math nodes.
rowNormalisation.knwf (23,0 Ko)

Your calculation looks pretty optimal. If you wish you can change 2 Math Formula nodes by one

Here is what I think you can do to automate the process:

rowNormalisation.knwf (429.5 KB)

:blush:

4 Likes

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