-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Implement get_feature_names_out for SimpleImputer #21200
Copy link
Copy link
Closed
Labels
Description
Describe the workflow you want to enable
I would like to get the feature names input to a classifier after imputation.
column_trans = ColumnTransformer([('imputed', SimpleImputer(add_indicator=True), x_con)], remainder='drop')
# column_trans = ColumnTransformer([('scaler', preprocessing.StandardScaler(), x_con)], remainder='drop')
pipe = make_pipeline(column_trans, LogisticRegressionCV(cv=2, random_state=0))
pipe.fit(X, y)
pipe[:-1].get_feature_names_out()
Describe your proposed solution
Implement get_feature_names_out for SimpleImputer as it is implemented for other transformers e.g. it works for StandardScaler.
Describe alternatives you've considered, if relevant
No response
Additional context
No response
Reactions are currently unavailable