Comments (9)
It is present for dSFMT. I am hesitant to alter the MT19937 generator since it has been kept to closely match NumPy. It is also an old, slow PRNG :-).
from ng-numpy-randomstate.
Yes, why I am missing a jump ahead for the MT19937 is only because it's so popular and still much used (e.g. numpy). It is really hard to get independent streams for it. I'm not an expert on the implementation of PRNGs but wouldn't the jump function only translate the internal state forward, so in essence wouldn't interfere with the working of the generator itself?
from ng-numpy-randomstate.
It isn't really possible to get independent streams from MT19937 -- jump just moves you to a distant point in the cycle. Thanks for the suggestion -- I will think about it could be done without breaking MT19937 (should be possible).
from ng-numpy-randomstate.
Thanks for the quick reply and if you decide to add it, that would be just great. By independent streams I mean exactly that, we can be assured that they don't overlap (until of course you reach the jump length in the previous stream). Perhaps indenpendent was a bad choice of word here :)
from ng-numpy-randomstate.
Even with a large jump -- 2^512 -- it is essentially impossible to cycle the generator. This said, most PRNGs have some low frequency dependence and so you don't want to use too much of the cycle (I would say < 5% -- this is the reason to like large cycle PRNGs for large scale simulation work even if one could never exhaust the space).
from ng-numpy-randomstate.
Yes, so my use case would be in a large parallel setting where I need to be able to repeat the simulation but also overlapping streams will cause trouble. So if I need e.g. 1000 unique streams, given an initial state, the jump function would seem as a robust option and guarantee they won't overlap. Also I can easily reproduce the result. I'm not sure how close states initialized with different seeds may end up to each other.
from ng-numpy-randomstate.
@lintusj1 I have mostly finished this (not tested) in the branch mentioned in this thread. In implementing this I noticed that maximum jump ahead is 2^31 which seems quite small. Do you think this would be useful for you with such a small jump?
from ng-numpy-randomstate.
@bashtage Thank you for letting me know. Indeed, the 2^31 maximum jump limit is surprisingly small and unfortunately probably a bit too risky in my use case.
from ng-numpy-randomstate.
Looks like it can be made to be much bigger -- e.g., 2**128 -- so this is back on he roadmap.
from ng-numpy-randomstate.
Related Issues (20)
- is this normal? HOT 5
- Python 3.6 wheels HOT 8
- help on RandomState functions show numpy examples HOT 3
- Can not be used on Debian 9 HOT 3
- Can you provide a function to generate random number from multiple streams HOT 3
- Jump is too slow for larger jump steps! HOT 10
- optimized uniform small integers? HOT 4
- Add xoroshiro128+ HOT 1
- Lift "No Compatibility Guarantee" HOT 5
- Improve docstring for dtype
- Upload the latests releases to pypi? HOT 1
- faster ziggurat-like methods HOT 9
- did random_uintegers go away? HOT 11
- Segfault when seeding some prng's with float64 HOT 6
- A bug in MultithreadedRNG HOT 8
- Is there a generic randomstate class I can inherit from? HOT 3
- lognormal doc enhancement? HOT 2
- 1.13 fails to build HOT 13
- `advance` and `randint` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-numpy-randomstate.