In M1.05 and the lesson before , you use the parameter ‘remainder’ and set it to "passthrough’ when only categorical data are processed but let in in default value (“drop”) when numerical data are processed too.
preprocessor = ColumnTransformer([
('categorical', categorical_preprocessor, categorical_columns)],
remainder="passthrough")
preprocessor = ColumnTransformer([
('numerical', StandardScaler(), numerical_columns),
('categorical', OrdinalEncoder(handle_unknown="use_encoded_value",
unknown_value=-1),
categorical_columns)])
I did test to use remainder
with drop
value for categorical data processing and the accuracy of the model decrease.
Why is it different to ‘drop’ non-specified columns or to ‘passthrough’ them?
Do we have to set remainder
on passthrough
each time we processed only a part of our data or is it just for categorical data?
Thank for your answers