Weird R^2 from Numeric Scorer node


I’m seeing some weird R^2 from the Numeric Scorer node. Attached is a workflow that demonstrates what I mean.

As an example, for the data labelled “hold-out” the Numeric Scorer reports R^2 of -0.06. However squaring the output of the Linear Correlation resulted in ~0.39. 0.39 was also confirmed in the 2D/3D Scatter Plot node and in tools outside of KNIME.

This looks like it might be a bug. I’ve confirmed that the other parameters from the Numeric Scorer are fine.



Strange R-squared.knwf (45.3 KB)

Update: After some further reading, I’m less confident that these values are wrong. I’m still confused as to why the Numeric Scorer gives a different R^2 to any other tool I can find.

Update 2: OK, so it seems everyone just reports the square of the Pearson product moment correlation coefficient as R^2. Would it be appropriate for the Numeric Scorer node to report this too, in addition to the other (truer?) R^2?

Hi Richard,

thank you for pointing this out to us!!!

I took a look at R^2 and the Pearson Correlation Coefficient. Before I create a feature request I would like to take a look at the results from other tools, as you did, and understand a bit better when R^2 is equivalent to the Pearson Correlation Coefficient and why other tools provide R^2 as the square of the Pearson product correlation.

Therefore it would be great to know which model you trained (linear regression?) and which functions you used in Python or R?

Thanks again,