Assign the regression variables to two models at a time.

I have made a workflow where I calculate two linear regression models, each with the same dependent and independent (target) variables. In the first, with the help of a “Group Loop Start” I obtain the models of the different categories of a segmentation variable called “Banks” and in the second I obtain the results without segmenting (The regression to total). Finally, I concatenate the results of the two models in a table.

If I wanted to change the variables in the regression nodes for different ones, I would have to open each one and change them. I would like to know if there is a possibility, using a node or something similar, to define the dependent and independent variables (only once), and have them selected at the same time in each of the two regression nodes and not have to open each node to change them.

Could you please tell me if it is possible to do this?



Hi,

I think something similar to this may do what you want to achieve:

You basically need to get a list of your unique Variables, and then use the Table View (Java Snippet) node to manually select the variable you want to be the dependent one. All others will be used as independent variables for modeling. You should configure your second Linear Regression Learner similar to this one and push the dependent variable into it using the Flow Variable Ports.

I hope it works with your data but may need some tweaking, but this is maybe enough to inspire you to a working solution.

Best wishes/Evert

Assign the regression variables to two models at a time.knwf (19.8 KB)

2 Likes

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