-
Notifications
You must be signed in to change notification settings - Fork 414
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
Making DataFrameMapper compatible with GridSearchCV #170
base: master
Are you sure you want to change the base?
Conversation
Sorry to revive the issue but any chances of this being merged @devforfu? This would be a really nice feature to have. |
你好,已收到,谢谢。
|
@devforfu, thanks for the work. I have copied all the code from the latest commit of your fork and tried it with this is how the parameters look when multiple column names are used.
reproducible examples:
It would be a lot more useful, intuitive and practical if also, your code uses the column names to name the parameters. setting the params gets unintuitive when same column is used multiple times in different transformer steps. in my example code above, if both the |
In this PR, an attempt to implement the proposal from issue #159 is made. The idea is to write custom
get_params
andset_params
methods that are compatible withscikit-learn
grid search objects.The following snippet shows features supported:
We still need to add more tests and think about possible edge cases. For example, I am not sure how to handle this case:
Also, I think that the current implementation of
set_params
could be revised/optimized, and we can handleget_params
andset_params
for cases when all the transformed columns have only a single transformer usingPipeline
class instead of writing a custom code.Would be glad to know your thoughts and proposals to finalize the PR and make the
DataFrameMapper
grid-search ready.