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

Allow user to set the seed #26

Open
valentinitnelav opened this issue Sep 3, 2020 · 0 comments
Open

Allow user to set the seed #26

valentinitnelav opened this issue Sep 3, 2020 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@valentinitnelav
Copy link
Owner

Currently in boot_networklevel the seed is set internally and maybe that is not a good practice. Reproducibility is assured, but maybe should let the user be a bit more in charge of this.
In boot_networklevel there are two cases when seed is employed:

  1. In the usage of boot_networklevel_once, when computing a network index for the sampled interactions. Is set internally to set.seed(42);
  2. Then in boot_networklevel_n, when calling sample_indices;
  3. Again in boot_networklevel_n, when running boot_networklevel_once in parallel an the iterator is passed as seed to boot_networklevel_once.

I think point 3 should stay unchanged because each iteration should generate different samples, otherwise we take the same sample every time. Or could generate a sequence of integers of the same length as the amount of iterators based on a user given seed and then pass those as seeds to boot_networklevel_once. However, that sounds unnecessarily complicated...

Nevertheless, the seed at point 2 could be a parameter that the user may want to change. Would this be worth implementing? If yes, then set the default value of 42 so that users don't snap if they test old results with new ones.

This should also be applicable for boot_specieslevel.

@valentinitnelav valentinitnelav added enhancement New feature or request question Further information is requested labels Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant