Trouble building recursive VIF-based feature elimination in KNIME (IF Switch + Recursive Loop)

I am trying to implement recursive multicollinearity removal using VIF in KNIME.

Goal:
Iteratively remove the column with the highest VIF if VIF > threshold (5).
Stop when no VIF > 5 remains.

Workflow Logic

  1. Initial dataset → Recursive Loop Start

  2. Compute VIF (custom component from KNIME Hub)

  3. Sort VIF descending → Top k Row Filter (k=1)

  4. Rule Engine
    if top VIF > 5 → "REMOVE" else "STOP"

  5. Table Row to Variable
    Extract top-VIF column name → variable

  6. Column Name Extractor
    Get full list of columns

  7. Reference Row Filter
    Remove the column if action = REMOVE
    Else pass data unchanged

  8. IF Switch → End IF → Recursive Loop End

Issue

Everything works except wiring the loop correctly.

  • The Recursive Loop End executes, but

  • The Recursive Loop Start bottom feedback port remains empty in my setup

  • So workflow doesn’t allow execution as a full loop

I get stuck deciding which output should connect to the feedback input on Recursive Loop Start.

Can any one please help with what I am missing here?

Best Regards,


KNIME_project.knwf (205.5 KB)

Hi,

To remove the columns with a high VIF you can do the following:

  • VIF creates a table with column names and VIF value
  • filter this table, e.g. VIF < 5
  • transpose table to create a reference table
  • filter the data table

I don’t see why there is a need for the recursive loop.

But to do so, you have to adapt the wiring to this:

The “Recursive Loop Start” does not need an extra input port for the recursion. It’s done automatically by KNIME, i.e. the lower input port auf the “Recursive Loop End” is internally given back to the start node for the next generation

1 Like