Hi,
First of all, thank you very much for this excellent course!
My question is somewhat naive.
In the “One-hot encoding of categorical variables”, I put
categorical_preprocessor = OneHotEncoder(handle_unknown="ignore", sparse=False)
preprocessor = ColumnTransformer([
('categorical', categorical_preprocessor, categorical_columns),
('numerical', numerical_preprocessor, numerical_columns)]
)
In the correction, in the line preprocessor, you don’t include the numerical preprocessor, why?
preprocessor = ColumnTransformer([
('one-hot-encoder', categorical_preprocessor, categorical_columns)],
remainder="passthrough")
What I understood is that the numerical columns are left as they are, so they are not scaled. Am I wrong?
For me, the 2 instances of the ColumnTransformer are not the same, so the model and the results may differ (even in this case, my results are close to the expected ones).
I hope that my question/observation is clear? (I’m not so fluent in english).
Thank you in advance,