How to set the column of numeric scorer automatically

After the Regression Learner & Predictor, we use the Numeric Scorer.
But we need to choose Reference column and Predicted column,but both are obviously.

I believe there is a automatic way to set those columns, but I don’t know how.

Hi @holyeightmonk and welcome to the KNIME forum!

Below you will find a possible solution to predefine which columns should be used to calculate the regression statistics using the -Numeric Scorer- node:

In this simple example, the column names are “petal width” and “Prediction (petal length)” and they are defined using a -Variable Creator- node, as showed in the snapshot above.

Then you will need to configure the -Numeric Scorer- node using the “flow Variables” tab in the -Numeric Scorer- node configuration menu, as follows:

Once you have done that, the configuration menu should show the following highlighted message:

A dummy workflow example is attached below:

20211227 Pikairos How to set the column of numeric scorer automatically.knwf (195.3 KB)

Hope this helps.

Best

Ael

7 Likes

Hi @aworker and thank you for your reply.

I tried using the given workflow.
I know how to set a column in Numeric Scorer.

If I change from the iris dataset to the diabetes dataset, should I rewrite the “Value” in “Variable Creator”?
Is it possible to pass the “Target” information of “Linear Regression Learner” to “Variable Creator”?

Hi @holyeightmonk

Yes indeed, it is possible :wink:

One needs for that to set a variable with the selected target column in the -Linear Regression Learner- node, as follows

image

and then from it, generate the name of the Predicted Column using a -String Manipulator (variable)- node as follows

The workflow looks as follows, now with the two possible solutions

and here it is available

20220105 Pikairos How to set the column of numeric scorer automatically.knwf (214.9 KB)

Hope it helps

best

Ael

3 Likes

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