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

Provide standard kwarg for model fitting random seed #90

Closed
juntyr opened this issue Oct 22, 2023 · 2 comments
Closed

Provide standard kwarg for model fitting random seed #90

juntyr opened this issue Oct 22, 2023 · 2 comments
Labels
enhancement New feature or enhancement

Comments

@juntyr
Copy link

juntyr commented Oct 22, 2023

I am trying to make PCA fitting using xeofs.models.EOF reproducible by always selecting the randomized solver and passing a random_state kwarg to the solver. Unfortunately, not all solvers that xeofs uses internally, in this case, use a random_state parameter, one also uses seed, and neither accepts the other. At the moment, I need to loop over these possibilities, try each, and catch the type error if it was the wrong one. Could the model init or fit method take a random_state or seed parameter that is then passed to the correct kwarg for the chosen solver? Thanks for your help and the fantastic library!

@nicrie
Copy link
Contributor

nicrie commented Oct 22, 2023

Thanks for bringing this up, sounds reasonable. I'll see if I can include it in the next release.

@nicrie nicrie added the enhancement New feature or enhancement label Oct 22, 2023
@nicrie nicrie closed this as completed in cf8b641 Oct 24, 2023
@juntyr
Copy link
Author

juntyr commented Oct 24, 2023

Thank you so much for the quick fix!

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

No branches or pull requests

2 participants