-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TST use global_random_seed in sklearn/cluster/tests/test_spectral.py #24802
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/cluster/tests/test_spectral.py #24802
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. Looks good to me
Hi @irene000 , thanks for your pull request!
This will fix the lint issue and trigger all the other checks. Thanks! |
…/irene000/scikit-learn into test_spectral_global_random_seed
…/irene000/scikit-learn into test_spectral_global_random_seed
test_spectral_clustering test_spectral_clustering_sparse test_precomputed_nearest_neighbors_filtering test_affinities test_cluster_qr test_cluster_qr_permutation_invariance test_discretize test_spectral_clustering_with_arpack_amg_solvers test_n_components
test_spectral_clustering test_spectral_clustering_sparse test_precomputed_nearest_neighbors_filtering test_affinities test_cluster_qr test_cluster_qr_permutation_invariance test_discretize test_spectral_clustering_with_arpack_amg_solvers test_n_components
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 @irene000
For the record I slightly modified the dataset in one of the tests because it was failing for a single seed and after a deep dive into the algorithm it turns out that there's inherent randomness in scipy's I suspect that it's just the result of rouding errors that accumulate differently in different calls because of the multi-threaded underlying BLAS/LACPACK calls, in which case it's kind of expected and there's nothing to do about it. |
Reference Issues/PRs
#22827
What does this implement/fix? Explain your changes.
Use global_random_seed in tests of test_spectral.py
Any other comments?