Skip to content

[MRG] DEP Deprecate None in FeatureUnion #15053

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

Conversation

thomasjpfan
Copy link
Member

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

Choose a reason for hiding this comment

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

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

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

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

Choose a reason for hiding this comment

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

LGTM, thanks @thomasjpfan

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Nits but LGTM

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



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

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

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!)

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Please fix merge conflicts. LGTM, otherwise.

@adrinjalali
Copy link
Member

linter error. Otherwise LGTM

@adrinjalali adrinjalali merged commit 16f4ac9 into scikit-learn:master Oct 6, 2019
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.

4 participants