I'm doing a big data project where I am predicting the quality of wine based on attributes. This leaves me with an r-squared of 0,4. What I want to do is to tell Knime that a variance of 1 (Say quality is 4 and predicted is 3 or 5) should also be seen as a correct prediction. Is there a way to do this?

Hi Nichlas,

R² becomes somewhat meaningless in this case but you could use calculate the absolute distance between prediction and actual value via the "Math Formula" node and then use a "Rule Engine" node to change the predicted values to the actual values in those cases where the prediction is in the range of +1/-1. After that use the "Numeric Scorer" node to calculate R² (although, statistically speaking, if you tamper with the variance then what does R² really mean? --> I'd rather use a Cross-Table and the classification correct/incorrect and simply look at accuracy percentages as that carries a clear meaning).

Hope this helps,

Johannes