-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
FIX FunctionTransformer overwrite column names if not consistent #28241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ended up a large diff 😁
The failure will be solved by merging #28262 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM.
As I mentioned before, my pull-request in pycaret to have scikit-learn 1.4 support failed, but now I have just modified the scikit-learn code on my laptop with the modifications in this PR, so far, I have run the scikit-learn test again pycaret that failed because of get_feature_names_out and now the test passed! For more context, I refer to my Pycaret pr with failing tests because of get_feature_names_out, it's here: pycaret/pycaret#3857 |
closes #28232
This make the
FunctionTransformer
more lenient by overwriting columns if the output is not consistent with the behaviour ofget_feature_names_out
. We were previously raising an error instead but we used this inconsistency within theColumnTransformer
.It remains one question: do we want to trigger a copy when setting the columns? I think it is weird that the input
X
get modified once passed in theFunctionTransformer
.