Skip to content
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] DEP Deprecate None in FeatureUnion #15053

Merged

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Sep 21, 2019

Reference Issues/PRs

Related to #14813

What does this implement/fix? Explain your changes.

Deprecates None in FeatureUnion.

Any other comments?

Two options to do the same thing is undesirable.

Copy link
Member

@adrinjalali adrinjalali left a comment

Also needs a whats_new entry

@@ -907,7 +908,9 @@ def test_set_feature_union_steps():
assert ['mock__x5'] == ft.get_feature_names()


# TODO: Remove in 0.24 when 'drop' is removed for FeatureUnion
Copy link
Member

@adrinjalali adrinjalali Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop or None?

@pytest.mark.parametrize('drop', ['drop', None])
@ignore_warnings(category=DeprecationWarning)
Copy link
Member

@adrinjalali adrinjalali Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we fix the test instead?

Copy link
Member

@adrinjalali adrinjalali left a comment

LGTM, thanks @thomasjpfan

Copy link
Member

@NicolasHug NicolasHug left a comment

Nits but LGTM

If we're going to merge this one + the Voting one, I think we should deprecate that for pipelines too

sklearn/tests/test_pipeline.py Show resolved Hide resolved


# TODO: Remove in 0.24 when None is removed
def test_feature_union_warns_with_drop():
Copy link
Member

@NicolasHug NicolasHug Sep 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def test_feature_union_warns_with_drop():
def test_feature_union_warns_with_none():

@@ -907,6 +907,7 @@ def test_set_feature_union_steps():
assert ['mock__x5'] == ft.get_feature_names()


# TODO: Remove in 0.24 when None is removed for FeatureUnion
Copy link
Member

@NicolasHug NicolasHug Sep 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# TODO: Remove in 0.24 when None is removed for FeatureUnion
# TODO: Remove parametrization in 0.24 when None is removed for FeatureUnion

(we don't want to remove the test!)

rth
rth approved these changes Oct 4, 2019
Copy link
Member

@rth rth left a comment

Please fix merge conflicts. LGTM, otherwise.

@adrinjalali
Copy link
Member

@adrinjalali adrinjalali commented Oct 4, 2019

linter error. Otherwise LGTM

@adrinjalali adrinjalali merged commit 16f4ac9 into scikit-learn:master Oct 6, 2019
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants