Skip to content

TST use global_random_seed in sklearn/decomposition/tests/test_kernel_pca.py #30518

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 5 commits into from
Jan 14, 2025

Conversation

pedro9olivares
Copy link
Contributor

@pedro9olivares pedro9olivares commented Dec 20, 2024

Hi!

I'm opening this PR in regards to this issue.

Modified the following functions:

  • test_kernel_pca
  • test_kernel_pca_consistent_transform
  • test_kernel_pca_deterministic_output
  • test_kernel_pca_sparse
  • test_kernel_pca_linear_kernel
  • test_kernel_pca_n_components
  • test_kernel_pca_precomputed
  • test_kernel_pca_inverse_correct_gamma

Added an additional argument "global_random_seed" for the RandomState which was previously hardcoded.

Copy link

github-actions bot commented Dec 20, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 594492a. Link to the linter CI: here

@ogrisel
Copy link
Member

ogrisel commented Dec 24, 2024

Please push an extra empty commit to this PR to trigger the updated tests with all admissible random seeds on all CI runners as documented in #28959.

@pedro9olivares
Copy link
Contributor Author

Please push an extra empty commit to this PR to trigger the updated tests with all admissible random seeds on all CI runners as documented in #28959.

Will do!

test_kernel_pca
test_kernel_pca_consistent_transform
test_kernel_pca_deterministic_output
test_kernel_pca_sparse
test_kernel_pca_linear_kernel
test_kernel_pca_n_components
test_kernel_pca_precomputed
test_kernel_pca_inverse_correct_gamma
Copy link
Contributor

@OmarManzoor OmarManzoor 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 @pedro9olivares

@OmarManzoor OmarManzoor enabled auto-merge (squash) January 14, 2025 10:25
@OmarManzoor OmarManzoor merged commit f15ddc0 into scikit-learn:main Jan 14, 2025
31 checks passed
@ArturoAmorQ
Copy link
Member

Congrats on your first merge in scikit-learn, @pedro9olivares!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants