I have the following scenario:
num_cols = ["list", "of", "column", "names"]
cat_cols = ["different", "list", "of", "column", "names"]
col_transformer = ColumnTransformer([
('num', Scaler(), num_cols),
('cat', OneHotEncoder(), cat_cols)
])
pipeline = Pipeline([
('transformer', ColumnTransformer()),
('regressor', LogisticRegression())
])
Now I would like set values for num_cols
and cat_cols
dynamically when calling pipeline.fit()
.