Why does the Partial Dependence Pre-processing node requires the Input to be to Double?

Hello all,

Why does the Partial Dependence Pre-processing node requires the Input to be to Double? Why can’t it accept a Int?

Thanks! :slight_smile:
Saqib

Hi,
I don’t know much about the inner workings of that component, but it seems like this is just so that there are consistent data types coming out of an internal loop. If you need to pass columns of type integer, you can just convert them to double using the Column Rename node.
Kind regards
Alexander

1 Like

Hello @AlexanderFillbrunn,

I tried using the Column Rename node to convert an Integer to DoubleValue, but here the error msg that the Partial Dependence Pre-processing gave after I sent in the converted values:

ERROR Loop End 0:0:0:30 Execute failed: Input table's structure differs from reference (first iteration) table: Column 10 [Account Length (Number (double))] vs. [Account Length (Non-Native [interface org.knime.core.data.DoubleValue, interface org.knime.core.data.IntValue, interface org.knime.core.data.DataValue, interface org.knime.core.data.LongValue, interface org.knime.core.data.ComplexNumberValue, interface org.knime.core.data.FuzzyNumberValue, interface org.knime.core.data.FuzzyIntervalValue, interface org.knime.core.data.BoundedValue])]

Ah, that’s because KNIME does not really convert it, but just changes its type metadata. Sorry for misleading you. I think the following should work: Use a Math Formula (Multi Column) node and at the top of the configuration, select all the columns you want to convert to double. In the expression at the bottom, enter “$$CURRENT_COLUMN$$” (without quotes) or click on the CURRENT_COLUMN row in the left list. Then select “Replace Selected Columns” below. This should really convert the values to double.
Kind regards
Alexander

3 Likes

Thanks @AlexanderFillbrunn! That worked! :slight_smile:

1 Like

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