I would like to use a flow variable in the Feature Selection Filter, i.e. the flow variable (the best-fit model selected before) shall determine which model is selected in the Feature Selection Filter.
So, the Feature Selection Loop calculates several models, the GroupBy selects the model with minimum RMSE, the Table Row to Variable defines this model as flow variable (Selected features, RowID etc.) --> and then, in the Feature Selection Filter, exactly this model shall be selected.
My problem is that when I try to configure the Feature Selection Filter with the Flow variables tab, and I choose the Selected Features or RowID as flow variables, I always get the error message “Errors when overwriting node settings with flow variables: Unable to parse…”
My suspicion is that you’re trying to overwrite a boolean node setting with a string flow variable whose value is neither “true” nor “false”. However, to verify or falsify that suspicion, I’d need some more context.
To this end, could you provide me with details about
the full error message you’re seeing,
the type and value of the flow variable(s) you’re using (e.g., a screenshot of the flow variables tab in the output of the Table Row to Variable node) and
the node settings you’re trying to overwrite (e.g., a screenshot of the flow variables tab in the configuration dialog of the Feature Selection Filter node).
Node settings Feature Selection Filter:
it also offers RowID.
When I choose Nr of features, it works, but it does not necessarily choose the correct model.
Looks like the Feature Selection Filter node does not expose its selected columns in the flow variables tab. Thus, I don’t think you can control which model(s) to select/filter in the node via a flow variable.
The includeTargetColumn setting that you’re attempting to control via a String flow variable is indeed a boolean setting that corresponds to the “Include static columns” setting in the Column Selection tab.
unfortunately, what you are trying to do is not possible with the Feature Selection Filter node.
However, there are two alternative solutions that should work:
Identify the smallest RMSE as flow variable and set the errorThreshold to that variable. If your node is in “Select features automatically by score threshold” mode, it should automatically select the features you are trying to select.
With KNIME 4.1.0 we introduced a bunch of new flow variable types, including boolean and arrays of flow variables. By splitting the comma separated string representing the best feature set, and reaggregating it into a list of strings, you could convert it into a string array flow variable that can be used to configure our Column Filter node.
I believe the first approach is much easier and I’d highly recommend to try it before diving into the second approach.