-
Notifications
You must be signed in to change notification settings - Fork 51
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
Deprecate jumpahead
in get_random_state
#711
Comments
good catch! Let's do what you suggest and raise an exception if anyone uses this feature and disable it |
This hasn't been implemented, right? edit: no and once it gets implemented, the unit test should probably check for it. |
Yeah this can trip people up when they make pseudo-data trials and they wonder why their trials don't look so independent. If this is still a thing then yes it should definitely get fixed! 😅 |
Interestingly, the OG version of the unit test, using |
It doesn't always fail to produce independent series. That's the terrible thing about it. :D |
The
jumpahead
argument inpisa.utils.random_numbers.get_random_state
does not result in independent sequences of output numbers if the random state is used to generate random numbers. It doesn't even reliably move the sequence of output numbers ahead by the given number, because callingrand
does not mean that the internal Mersenne twister is really moved by one step (and really, we don't have access to numpy internals and shouldn't make such assumptions anyway).A function that minimally implements the behavior of the PISA method is:
With the right settings for
jumpahead
, we can repeat sequences exactly after a few initially different numbers:We should deprecate
jumpahead
, as people can be mislead and use it to generate trials that they think are independent. My suggestion is to raise an Exception (no one cares about warnings) with instructions about how to fix the problem (by using a different seed instead ofjumpahead
).The text was updated successfully, but these errors were encountered: