Skip to content

[MRG + 1] Added a random_state=0 to many make_classification tests #7968

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 1 commit into from
Dec 2, 2016

Conversation

chenhe95
Copy link
Contributor

@chenhe95 chenhe95 commented Dec 2, 2016

Reference Issue

#7966

What does this implement/fix? Explain your changes.

Before, there were non-deterministic failures due to not setting random_state when testing on make_classification()

@@ -278,7 +278,7 @@ def test_consistency_path():

def test_liblinear_dual_random_state():
# random_state is relevant for liblinear solver only if dual=True
X, y = make_classification(n_samples=20)
X, y = make_classification(n_samples=20, random_state=0)
Copy link
Member

Choose a reason for hiding this comment

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

42 would have made @agramfort happier ;)

Copy link
Member

@amueller amueller Dec 2, 2016

Choose a reason for hiding this comment

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

As @chenhe95 is new to the project I think it's ok to be allow it. Now he knows better ;)

Thanks for the detective work and fix!

@raghavrv raghavrv added this to the 0.19 milestone Dec 2, 2016
@raghavrv raghavrv changed the title [MRG] Added a random_state=0 to many make_classification tests [MRG + 1] Added a random_state=0 to many make_classification tests Dec 2, 2016
@agramfort agramfort merged commit 1995994 into scikit-learn:master Dec 2, 2016
@agramfort
Copy link
Member

I can live with 0 but 42 is the magic number indeed !

@chenhe95 chenhe95 deleted the PR7966 branch December 2, 2016 21:16
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
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