-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] FIX passthrough parameter from make_column_transformer to ColumnTransformer #11183
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
[MRG] FIX passthrough parameter from make_column_transformer to ColumnTransformer #11183
Conversation
Note that I did not pass the So my question is: do we still not pass the weight and keep the current PR or just pass |
this is not tested? |
I don't understand the remark, maybe @jnothman remembers? I don't think the argument is very useful/important but I also don't see a good reason to leave it out. |
Speaking @jorisvandenbossche, |
So to clarify the remark of Guillaume (#11183 (comment)). The And when I added the However, if we don't care about the fact that weights should/can not be specified in the |
I don't care if weights are forwarded. It's okay if they are
|
OK, so I forwarded all parameters and removed the check. It will be catch by the |
make_column_transformer, ('first', scaler), (['second'], norm), | ||
transformer_weights={'pca': 10, 'Transf': 1} | ||
) | ||
assert_equal(ct.remainder, 'drop') |
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.
also add a similar check for transformer_weights
?
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.
ups
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.
No, we can't have transformer_names
under that specification. It assumes the user knows how to transform the transformers
list into their automatically-assigned names, which we shouldn't have to document for such a rarely used feature... Get rid of weights
Aha, so that was the reasoning we were looking for to understand how it was done this way originally! :-) But indeed, makes sense, so then we only pass through |
ea18574
to
4ffdbcd
Compare
OK, I revert it back to only pass |
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.
LGTM.
@@ -595,6 +595,15 @@ def make_column_transformer(*transformers, **kwargs): | |||
---------- | |||
*transformers : tuples of column selections and transformers | |||
|
|||
remainder : {'passthrough', 'drop'}, default 'passthrough' | |||
By default, all remaining columns that were not specified in | |||
`transformers` will be automatically passed through (default of |
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.
nitpick: double backticks around "transformers".
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.
ignore, I did not know about the controversy.
Follow-up on scikit-learn#12152 And added comment why transformer_weights is not passed through, see scikit-learn#11183 (review) for more discussion
Follow-up on #12152 And added comment why transformer_weights is not passed through, see #11183 (review) for more discussion
…2156) Follow-up on scikit-learn#12152 And added comment why transformer_weights is not passed through, see scikit-learn#11183 (review) for more discussion
Stumble in an issue with the
make_column_transformer
which is missing the remainder parameter.I added the parameter. I don't think that we need a what's new.