[MRG] add sparse_threshold to make_column_transformer#12152
Merged
amueller merged 1 commit intoscikit-learn:masterfrom Sep 25, 2018
Merged
[MRG] add sparse_threshold to make_column_transformer#12152amueller merged 1 commit intoscikit-learn:masterfrom
amueller merged 1 commit intoscikit-learn:masterfrom
Conversation
| ct = make_column_transformer(('first', scaler), (['second'], norm), | ||
| n_jobs=3, remainder='drop') | ||
| n_jobs=3, remainder='drop', | ||
| sparse_threshold=0.3) |
Member
There was a problem hiding this comment.
Can you use a different default here? Otherwise the test below is not checking that the correct value is actually passed through (as 0.3 is the default)
Contributor
Author
There was a problem hiding this comment.
I just pushed it -again - too late?
Member
There was a problem hiding this comment.
yeah, don't worry (we are in a hurry a bit to get a release done).
Already opened a follow-up PR: #12156
Member
There was a problem hiding this comment.
But thanks for the PR!
qinhanmin2014
approved these changes
Sep 25, 2018
jorisvandenbossche
added a commit
to jorisvandenbossche/scikit-learn
that referenced
this pull request
Sep 25, 2018
Follow-up on scikit-learn#12152 And added comment why transformer_weights is not passed through, see scikit-learn#11183 (review) for more discussion
amueller
pushed a commit
that referenced
this pull request
Sep 25, 2018
qinhanmin2014
pushed a commit
that referenced
this pull request
Sep 25, 2018
Follow-up on #12152 And added comment why transformer_weights is not passed through, see #11183 (review) for more discussion
jnothman
pushed a commit
to jnothman/scikit-learn
that referenced
this pull request
Oct 15, 2018
…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
yarikoptic
added a commit
to yarikoptic/scikit-learn
that referenced
this pull request
Nov 29, 2018
* tag '0.20.0': (77 commits) ColumnTransformer generalization to work on empty lists (scikit-learn#12084) add sparse_threshold to make_columns_transformer (scikit-learn#12152) [MRG] Convert ColumnTransformer input list to numpy array (scikit-learn#12104) Change version to 0.20.0 BUG: check equality instead of identity in check_cv (scikit-learn#12155) [MRG] Fix FutureWarnings in logistic regression examples (scikit-learn#12114) [MRG] Update test_metaestimators to pass y parameter when calling score (scikit-learn#12089) DOC Removed duplicated doc in tree.rst (scikit-learn#11922) [MRG] DOC covariance doctest examples (scikit-learn#12124) typo and formatting fixes in 0.20 doc (scikit-learn#11963) DOC Replaced the deprecated early_stopping parameter with n_iter_no_change. (scikit-learn#12133) [MRG +1] ColumnTransformer: store evaluated function column specifier during fit (scikit-learn#12107) Fix typo (scikit-learn#12126) DOC Typo in OneHotEncoder DOC Update fit_transform docstring of OneHotEncoder (scikit-learn#12117) DOC Removing quotes from variant names. (scikit-learn#12113) DOC BaggingRegressor missing default value for oob_score in docstring (scikit-learn#12108) [MRG] MNT Re-enable PyPy CI (scikit-learn#12039) MNT Only checks warnings on latest depedendencies versions in CI (scikit-learn#12048) TST Ignore warnings in common test to avoid collection errors (scikit-learn#12093) ...
yarikoptic
added a commit
to yarikoptic/scikit-learn
that referenced
this pull request
Nov 29, 2018
* releases: (77 commits) ColumnTransformer generalization to work on empty lists (scikit-learn#12084) add sparse_threshold to make_columns_transformer (scikit-learn#12152) [MRG] Convert ColumnTransformer input list to numpy array (scikit-learn#12104) Change version to 0.20.0 BUG: check equality instead of identity in check_cv (scikit-learn#12155) [MRG] Fix FutureWarnings in logistic regression examples (scikit-learn#12114) [MRG] Update test_metaestimators to pass y parameter when calling score (scikit-learn#12089) DOC Removed duplicated doc in tree.rst (scikit-learn#11922) [MRG] DOC covariance doctest examples (scikit-learn#12124) typo and formatting fixes in 0.20 doc (scikit-learn#11963) DOC Replaced the deprecated early_stopping parameter with n_iter_no_change. (scikit-learn#12133) [MRG +1] ColumnTransformer: store evaluated function column specifier during fit (scikit-learn#12107) Fix typo (scikit-learn#12126) DOC Typo in OneHotEncoder DOC Update fit_transform docstring of OneHotEncoder (scikit-learn#12117) DOC Removing quotes from variant names. (scikit-learn#12113) DOC BaggingRegressor missing default value for oob_score in docstring (scikit-learn#12108) [MRG] MNT Re-enable PyPy CI (scikit-learn#12039) MNT Only checks warnings on latest depedendencies versions in CI (scikit-learn#12048) TST Ignore warnings in common test to avoid collection errors (scikit-learn#12093) ...
yarikoptic
added a commit
to yarikoptic/scikit-learn
that referenced
this pull request
Nov 29, 2018
* dfsg: (77 commits) ColumnTransformer generalization to work on empty lists (scikit-learn#12084) add sparse_threshold to make_columns_transformer (scikit-learn#12152) [MRG] Convert ColumnTransformer input list to numpy array (scikit-learn#12104) Change version to 0.20.0 BUG: check equality instead of identity in check_cv (scikit-learn#12155) [MRG] Fix FutureWarnings in logistic regression examples (scikit-learn#12114) [MRG] Update test_metaestimators to pass y parameter when calling score (scikit-learn#12089) DOC Removed duplicated doc in tree.rst (scikit-learn#11922) [MRG] DOC covariance doctest examples (scikit-learn#12124) typo and formatting fixes in 0.20 doc (scikit-learn#11963) DOC Replaced the deprecated early_stopping parameter with n_iter_no_change. (scikit-learn#12133) [MRG +1] ColumnTransformer: store evaluated function column specifier during fit (scikit-learn#12107) Fix typo (scikit-learn#12126) DOC Typo in OneHotEncoder DOC Update fit_transform docstring of OneHotEncoder (scikit-learn#12117) DOC Removing quotes from variant names. (scikit-learn#12113) DOC BaggingRegressor missing default value for oob_score in docstring (scikit-learn#12108) [MRG] MNT Re-enable PyPy CI (scikit-learn#12039) MNT Only checks warnings on latest depedendencies versions in CI (scikit-learn#12048) TST Ignore warnings in common test to avoid collection errors (scikit-learn#12093) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #12149 sparse_thresold is desired in make_columns_transformer.
This is implemented here
Reference Issues/PRs
Fixes #12149
What does this implement/fix? Explain your changes.
Simply adds the
sparse_thresholdkeyword to themake_column_transformerand searches in the keyword arguments for the keyword. Modifies an existing test to still run.
Any other comments?