Skip to content

Conversation

@marenwestermann
Copy link
Member

Reference Issues/PRs

towards #22827

What does this implement/fix? Explain your changes.

Uses global_random_seed in function test_feature_agglomeration_feature_names_out.

Any other comments?

@marenwestermann marenwestermann changed the title TST use global_random_seed in sklearn/cluster/tests/test_feature_aggl… TST use global_random_seed in sklearn/cluster/tests/test_feature_agglomeration.py Jun 20, 2022
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

Thanks @marenwestermann. I will close this PR and make it obvious that this file does not need to be modified.

def test_feature_agglomeration_feature_names_out(global_random_seed):
"""Check `get_feature_names_out` for `FeatureAgglomeration`."""
X, _ = make_blobs(n_features=6, random_state=0)
X, _ = make_blobs(n_features=6, random_state=global_random_seed)
Copy link
Member

Choose a reason for hiding this comment

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

Actually this is one of the case that I don't think that it is necessary to test with several random_state. I think that we want mainly to check mathematical and numerical stability while this test is about the feature names. So it does not really matter the variation in X itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, I didn't pay attention properly here. Thanks for reviewing @glemaitre!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants