Get the name of the categories in a loop linear regression

I am performing a linear regression applied to the different categories of a segmentation variable with the help of the “Group Loop Start” node. By applying after this node “Linear Regression Learner” and finally in “Loop End”, I obtain a variable called “Iteration” that shows me the number of the iteration to which each regression belongs, however I would like to obtain the name of the category to which that regression belongs (not the iteration number); This is in order to more easily identify which category each regression belongs to.

Could someone please tell me how I can solve this problem?

Hi @dsotelo and welcome to the KNIME Community Forum,

The Group Loop Start node generates a flow variable for each column you have included as well as a “groupIdentifier”. You can add those to your table before the Loop End using a Constant Value Column or Variable to Table Column node.


Hi @dsotelo , without seeing any configuration or for variables I’ll have to make guesses, but from what you say, I understand that the category is used as the group for the loop?

If that is the case, there should also be a flow variable containing the value of the Category.

For example if I have a Group Loop Start that is configured to group by the MyCategory column…

… in the Flow Variables, I would expect to see the group identifier and the value of the column I have chosen for the grouping

So you can add a Variable to Table Column node between the Linear Regression Learner and the loop end
and have it turn your category variable back into a column for your output table

[Edit: @armingrudd … snap! :wink: ]


Yes, thank you very much, this was what I needed. I am just starting to learn this software and I have realized that flow variables are very important. I will see them more in depth.


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