-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
API Implements get_feature_names_out for transformers that support get_feature_names #18444
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
Merged
Merged
Changes from all commits
Commits
Show all changes
121 commits
Select commit
Hold shift + click to select a range
ab2acbd
work on get_feature_names for pipeline
amueller 3bc674b
fix SimpleImputer get_feature_names
amueller 1c4a78f
use hasattr(transform) to check whether to use final estimator in get…
amueller 7881930
add some docstrings
amueller de63353
fix docstring
amueller 8835f3b
Merge branch 'master' into pipeline_get_feature_names
amueller 2eba5de
fix merge issues with master
amueller 449ed23
fix merge issue
amueller a1fcf67
Merge branch 'master' into pipeline_get_feature_names
amueller b929341
don't do magic slicing in pipeline.get_feature_names
amueller 2b613e5
fix merge issue
amueller ad66b86
Merge branch 'master' of https://github.com/scikit-learn/scikit-learn…
amueller 5eb7603
trying to merge with input feature pr
amueller
8000
Jun 2, 2020
f4f832a
Merge branch 'master' into pipeline_get_feature_names
amueller 3a9054c
remove tests taht don't apply
amueller 9c4420d
Merge branch 'pipeline_get_feature_names' of github.com:amueller/scik…
amueller 76f5b54
fix onetoone mixing feature names
amueller 52f38e1
remove more tests
amueller cdda1fb
fix test for better expected outputs
amueller 5f4abbc
fix priorities in catch-all get_feature_names
amueller 4305a28
flake8
amueller c387b5b
remove redundant code
amueller 2fefb67
fix error message
amueller a6832c3
fix mixin order
amueller 0f45b22
small refactor with helper function
amueller 4717a73
linting for new options
amueller a658ba7
add feature names to lineardiscriminantanalysis and birch
amueller e9e45af
add get_feature_names in a couple more places
amueller 5acaced
fix up docs
amueller 0353f69
make example actually work
amueller 17a5016
Merge remote-tracking branch 'upstream/master' into pr/12627
thomasjpfan bb07886
ENH Converts to get_output_names
thomasjpfan 4e0968c
CLN Move deprecations
thomasjpfan 95046a0
WIP Deprecates dictvect get_feature_names
thomasjpfan f7aa3fd
WIP Deprecates text get_feature_names
thomasjpfan f4a9882
WIP Deprecates polyfeature.get_feature_names
thomasjpfan fa4b318
WIP Deprecates one hot encoder get_feature_names
thomasjpfan 640ad76
ENH Adds get_output_names to all transformers
thomasjpfan d9d2d95
ENH Add get_output_names everywhere
thomasjpfan f6075ca
STY Lint fixes
thomasjpfan 922748f
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan 1af211c
TST Adds test for missing indicator
thomasjpfan 9ab0cf9
REV Revert changes
thomasjpfan 2926492
TST Fixes
thomasjpfan c1a1778
BUG Fixes missing indicator
thomasjpfan 37101b0
TST Fixes test
thomasjpfan 82d0a60
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan 8833b5b
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan adcc1c1
TST Adds test filtering
thomasjpfan 9a07816
CLN Change to get_feature_names_out
thomasjpfan 0d3bc4e
CLN Reduces the number of diffs
thomasjpfan b922fa4
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan 21cbfe6
CLN Reduces the number of diffs
thomasjpfan 86887ae
CLN Less diffs
thomasjpfan 8ecb38f
CLN Refactor into _get_feature_names_out
thomasjpfan 8b3c856
STY Lint fixes
thomasjpfan 5260d7d
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan cf1ec1e
CLN Remove example since get_names is not implemented everywhere
thomasjpfan a63cd14
ENH Adds feature_selection for the example
thomasjpfan dddb4a8
TST Fixes KBins
thomasjpfan a87866b
Merge remote-tracking branch 'upstream/master' into get_output_names
thomasjpfan 6f35c0c
DOC Update glossary
thomasjpfan 526db41
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan f7c0062
STY Runs black
thomasjpfan 9722c08
CLN Adjust diff
thomasjpfan ba3aca2
CLN Stricter capturing
thomasjpfan c78967a
DOC Adds whats new
thomasjpfan f022a1b
TST Fixes errosr
thomasjpfan f10da10
CLN Address comments
thomasjpfan d8bafb3
TST Increases test coverage
thomasjpfan 8751296
DOC More docstrings
thomasjpfan be3f0b1
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan 84dc208
TST Fixes error message
thomasjpfan f41a40e
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan 149c4e3
CLN Improves test
thomasjpfan 41d0bb1
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan 628a2b3
TST Fix exception type
thomasjpfan d178069
Merge main
ogrisel faae557
Fix remaining occurrence of _feature_names_in
ogrisel 02a25be
cosmit
ogrisel 20ecd70
Attempt to fix numpydoc failure
ogrisel c6bc0ce
DOC Use ndarray of string
thomasjpfan b76fd41
DOC Update doc to use string
thomasjpfan d60c4fa
DOC More docstring fixes
thomasjpfan 4a00562
TST Adds failing test
thomasjpfan d5b72de
ENH Restrict to str and ndarrays
thomasjpfan a0b7446
ENH Convert ints to strs in dictvectorizer
thomasjpfan d8f84b3
ENH Uses feature_names_in_ in get_feature_names_out
thomasjpfan f1090df
TST Typo
thomasjpfan ae46466
TST Include transformers that define get_feature_names_out
thomasjpfan 2e2bdd8
BUG Fixes test for all array outputs
thomasjpfan 5575857
ENH Adds prefix_feature_names_out='when_colliding'
thomasjpfan 3d1546b
CLN Cleaner code
thomasjpfan 6e44a52
ENH Validates prefix_feature_names_out
thomasjpfan b07a3bc
ENH convert to ndarray for vectorizers
thomasjpfan fffabf0
ENH Less restrictive ndarray dtype
thomasjpfan ecec556
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan 5def4ce
ENH Adds prefix_feature_names_out as a bool
thomasjpfan 1fda1c1
DOC Remove use of deprecated api
thomasjpfan 9b8834b
DOC Update example with new api
thomasjpfan 9034a53
ENH More consistent input_features checking
thomasjpfan 9081ebd
WIP Better
thomasjpfan a4ce567
ENH Add prefix_features_names_out to make_column_transformer
thomasjpfan 12a2052
ENH Use in one example
thomasjpfan aece402
REV Remove
thomasjpfan ea31c18
CLN Adjust name
thomasjpfan 13d406b
DOC Adjust docstring
thomasjpfan d04ecec
CLN Remove unneeded code
thomasjpfan d3cc5b6
DOC Better docstring
thomasjpfan 76be321
TST Fix
thomasjpfan caff15b
FIX test_docstring for deprecated get_feature_names
ogrisel dcd685f
Merge branch 'main' into get_output_names
ogrisel d930b1b
ENH Error when n_features_in_ is not defined
thomasjpfan b379cd3
DOC Update docstring
thomasjpfan 83d12ec
CLN Address comments
thomasjpfan 0841049
Merge remote-tracking branch 'upstream/main' into get_output_names
thomasjpfan 8d0b3cf
Update sklearn/pipeline.py
lorentzenchr c35f7aa
Update doc/glossary.rst
lorentzenchr ec8b825
Update doc/glossary.rst
lorentzenchr 560c0d0
ENH Adds one-to-one transformers
thomasjpfan 043540b
Add one more test for one-to-one feature transformers with pandas
ogrisel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
I think this is the primary use case for this feature.