-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TST use global_random_seed in sklearn/ensemble/tests/test_iforest.py #22901
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
TST use global_random_seed in sklearn/ensemble/tests/test_iforest.py #22901
Conversation
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.
Thanks for the PR @MaxwellLZH. Here are some suggestions
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.
LGTM. Thanks @MaxwellLZH
test_iforest_sparse test_iforest_parallel_regression test_iforest_performance
tested with all random seeds in commit 768d4f2 |
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.
Otherwise, it looks good.
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
I pushed a new commit to also use the fixture in the |
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.
Assuming CI will stay green with the last commits, LGTM.
test_iforest_sparse test_iforest_parallel_regression test_iforest_performance test_iforest_chunks_works1 test_iforest_chunks_works2
…cikit-learn#22901) Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Reference Issues/PRs
Related issue #22827.
What does this implement/fix? Explain your changes.
Adds
global_random_seed
to tests that are checking model precision or consistency.The only tests that didn't work out-of-the box was
test_iforest_performance
which fails on a couple of seeds, so I increased sample size and made the outlier data a bit more obvious.