Skip to content
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

Adapting to numpy convention for random state setting #36

Closed
htwangtw opened this issue Jun 18, 2021 · 1 comment
Closed

Adapting to numpy convention for random state setting #36

htwangtw opened this issue Jun 18, 2021 · 1 comment

Comments

@htwangtw
Copy link
Contributor

Currently to get consistent numerical results, one needs to set a global random seed, as there's no random state parameter in the CCA classes.
It will greatly improve the numerical output consistency adding a parameter for random state.

It will also worth it to make sure the implementation is up-to-date with the latest best practice suggested by numpy.
The current example will not be supported after 1.16, see: https://numpy.org/doc/stable/reference/random/legacy.html
More discussion about the new best practice:
https://numpy.org/neps/nep-0019-rng-policy.html
https://albertcthomas.github.io/good-practices-random-number-generators/

@jameschapman19
Copy link
Owner

Fixed this with #44. Looks like scikit-learn with all models having random_state parameter. Results are reproducible when this parameter is not None

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

No branches or pull requests

2 participants