-
Notifications
You must be signed in to change notification settings - Fork 415
Allow to disselect features #137
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
Comments
I don't see this as a very common feature, but however could be cleanly implemented using a class of "column selectors":
Default implementation:
This way one can easily define subclasses of this class like:
And use them like:
Opinions? |
Probably the only thing that could be considered is naming of inherited classes, i.e. mapper1 = DataFrameMapper([
(ExcludeColumns('a'), LabelBinarizer())
])
mapper2 = DataFrameMapper([
(Skip('a'), LabelBinarizer())
]) I would say that this feature could be quite suitable, especially, in case of more sophisticated transformations or filters. Also, one could add additional flags to these classes like |
@devforfu The We can however provide the selector to exclude columns as example - both |
@dukebody Ok, understood =) So, the main thing is to bring support of that additional interface which could be provided instead of list of strings and would call a |
Yes, it looks even fun to implement. ;)
El dia 4 febr. 2018 15:39, "devforfu" <[email protected]> va
escriure:
… @dukebody <https://github.com/dukebody> Ok, understood =) So, the main
thing is to bring support of that additional interface which could be
provided instead of list of strings and would call a select() method on
dataframe before passing it down to next steps, as I can see.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#137 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACj4VmOvCx5zbFPWqmyxxzqu41oaghwks5tRcEvgaJpZM4R3o4U>
.
|
Currently I am using column selector transformers objects. But your definition of column selector looks really nice. Haven't thought of that place to insert the column selection. |
Closes #239 #137 Co-authored-by: Kit Monisit <[email protected]> Co-authored-by: ragrawal <[email protected]>
Hey,
assume you used DataFrameMapper to preprocess some of you columns and you generated a lot of new columns. Now you want to use a large portion of those columns to impute another subset of columns using some kind of regression. In such a case it might be easier to just disselect a handful of columns and use the rest to perform this task.
Why not pass those columns to default?
How it could be implemented?
keyword argument after alias names
deselect
with default value FalseProblems: Will potentially interfere with the way the default columns are calculated.
Objections against this idea? What further problems would you think of?
The text was updated successfully, but these errors were encountered: