forward or backward stepwise logistic regression

Hi  - i  am a new KNIME user wondering if there is a  forward or backward stepwise logistic regression module in KNIME or if there is an alternative method to accomplish forward or backward stepwise logistic regression within KNIME?



You can do this by placing our regression nodes between a Backward Feature Elimination Start and a Backward Feature Elimination End node.



Hi Roland!

Can you provide a workflow?

I do a lot of regressions but would be nice to test this process in my analysis.

Thank you!

Hi Fabio,

I have created an example for you, hope that helps!



Hi Roland!

Really cool! Can I ask you some questions about this process?

I'm planning to use the same workflow for Linear Regression with all numeric variables (around 12 independent variables). In my case:

  • Backward Elimination consider the predictor with the highest P Value to be removed. Is it possible to know wich was the predictor and what was the result of the model in every step?
  • Is it necessary to set up one of the Backward Feature nodes before start?
  • There are 2  Backward Feature Elimination Start node. Is it possible to give a short explanation?

Thank you for all your support!

Hi Fabio!

- You can see which predictor was removed in each step by looking at the "Removed feature" column of the Backward Feature Elimination End node

- The Backward Feature nodes do not require any configuration. You only have to specify the correct target/prediction columns in the Backward Feature Elimination End

- The 2:2 node differs from the 1-port node in that it has actually two ports on both sides. This makes it easier to feed training and test data into the flow.

Hope that helps!



Now with 4.1.2 things have changed.
My issue is that I can’t really use this, as nothing from linear regression learner goes as p-values to the loop end, so I am not able to perform stepwise regression filtering each step the variable with the highest p-value.
It’s a very common and used feature in other stat software, and it would be great to have it included as an option in the learner node.

Hi there @deicide_bg,

have you figured it out with help from @Martyna in this topic: Linear Regression Learner Output coefficients or still have questions?


Yes, but this topic about something else. :slight_smile:

Hi @deicide_bg -

The workflow linked above is a bit outdated. Have you tried using the Feature Selection Loop start and end nodes? I know the loop start node allows four different selection strategies.

I guess I’m not sure what has changed in 4.1.2, that you are not able to do something now that you could before? Can you expand on that a little bit?

EDIT: Some discussion from a prior thread here that may be useful: Backward Elimination

Essentially, a high p-value would kick a variable out.
I’m not able to perform this with the current “elimination” metanode loops. The End loop node just won’t understand p-values, or I don’t know how to do it. Anyway, such straight forward functionality should be out-of-the-box with KNIME. I mean, it has DL, but not a simple stepwise regression.Duh!