-
Notifications
You must be signed in to change notification settings - Fork 32
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
Random number weirdness #12
Comments
Would you want to try setting the seed using numpy and see if you get the same behavior. |
I do set the seed using random. If there were an issue where the seed was changed every iteration, I wouldn't get B constantly after the first trial. |
OK, I've been looking at this issue today. I was trying to add support for running the proposed nose tests with My conclusion is that the global state of the I think if we want this to work properly, we need to move away from the Python We could also try making sure that all the functions called in the course of sampling are pure Python, for which we'd probably have to move them outside the .pyx file. This would probably make sampling super slow. |
Would it be possible to stick to |
It would be possible, but we'd have to re-work some of the distribution On Wed, Jul 30, 2014 at 7:06 AM, Tamas Nagy [email protected]
|
I've been having this "bug" for a little bit, wanted to see if anyone else knew about it.
When I write test code, I seed
random.seed(0)
. I will then randomly generate a sequence to test, with the assumption that the sequence will be the same each time, since I set the seed.Occasionally, what will happen is that the first time I run a program, I will get sequence A, then every other time I will get sequence B, just by rerunning the code. All yahmm operations function appropriately, it's just that the random seed different. If I modify yahmm.pyx in any way (even to add comments), I will get sequence A again, then sequence B every other time.
Any thoughts?
The text was updated successfully, but these errors were encountered: