RandStream generators & dieharder validation suite?
10 views (last 30 days)
Show older comments
Hi,
Has anyone investigated the various MATLAB RandStream generator algorithms (see table in middle of page) using the dieharder validation suite? I'm seeking to generate large numbers (in the millions) of exceptionally uniformly random values & would appreciate seeing the detailed tabular output that dieharder provides.
I'm not super-handy with Visual Studio, but can pull off the basics. I would like to build the dieharder project myself, but as far as I can tell it seems to be targeted towards linux. Is this correct? Has anyone successfully modified the project for Visual Studio? If so, do you have general results you could share please about how any of the MATLAB random number generators fare?
I understand that my question relates in large part to a 3rd party product (Visual Studio) & thus isn't eligible for help from MATLAB support. Additionally, perhaps only a small fraction of MATLAB users are experienced with linux, Windows, & Visual Studio.
Obviously, there are other external venues where I can pose this same question. However, given the extensive MATLAB support for random number generation & numerous discussion threads about RNG, I thought I'd give my question a shot here first, hoping to find an interested & expert cross-platform compiler user.
Knowing that offering something especially real in return for help often gets faster results, I'm up for negotiating (via private message) a fair Paypal fee if s/o can provide step-by-step instructions for how to get the latest dieharder distribution to build in VS 2010. Of course, freely-offered help is always appreciated, but not expected in this case.
Due to the complexity of the issue & potential for a confusing thread, I would like to ask please that you make sure to verify a successful build at your end before posting any super-lengthy Answers.
However I get this answered, either here or via some external site, & whether by a helpful altruist or a needy graduate student, I will make sure all relevant information is posted here: a complete step-by-step solution & my test results for 2-3 chosen RandStream generators.
Thanks, Brad
3 Comments
Jan
on 14 Jan 2013
Dear Brad, without doubt you were very clear about your intention to share the results. You have neither been offending not rude. Offering a fee is polite, legal and fair. I do not not want to discourage you to pay anybody who assists you to solve your problem. Therefore I have no reasons to criticize the contents or tone of your question.
I got too many personal messages of cheaters, who offered some dollars for solving their homework. In opposite to this your question has a obviously a serious background. But the public appearance of money can have a bad influence to a forum, which lives from voluntary contributors. Therefore I've written, that I personally do not want this to happen more often, but not, that it should not happen at all.
In another Matlab forum there is a specific category for payed programming or assistance jobs. Unfortunately in this category about 20% of the threads must be deleted, because they violate the forum policies.
I hope my opinion got clearer now.
Accepted Answer
Jan
on 13 Jan 2013
Edited: Jan
on 13 Jan 2013
Asking your favorite search engine would reveal some useful instructions in the net, e.g.:
- https://comeau.info/index.php/2011/12/31/how-to-compile-dieharder-under-cygwin/
- http://jauu.net/var/print-queue/dieharder.pdf
Reading the instructions in the 2nd link are important: While compiling and running DIEHARDER is more or less easy, interpreting the results is very hard science. As long as all pseudo-random-number-generators are deterministic, tests like DIEHARD and DIEHARDER can check the entropy level only.
If you need good random numbers, true random numbers are strongly recommended:
- http://www.mathworks.com/matlabcentral/fileexchange/27942-www-random-org-random-integerssequencesstrings
- http://www.mathworks.com/matlabcentral/fileexchange/27849-randiorg-true-random-integer-numbers
The underlying service at www.random.org is limited, see quota. Therefore getting "millions" of numbers might be either take some time (days!), or you must pay for it. Another idea is to inflate the true random numbers by using them as frequently changing seeds for your pseudo-RNG. But in this case, testing the results by DIEHARDER is a good idea again.
Creating a true-RNG hardware at home is not very hard: One idea was to let an USB camera record a lava lamp and build differences between subsequent images to obtain random bits caused by noise. In a further step you can even omit the lava lamp and use a camera which create more noisy output for darker images and stick a black sheet of paper in front of the lens. Much more detailed instructions can be found by an internet research again.
3 Comments
Jan
on 14 Jan 2013
As you found out already, migrating the DIEHARDER suite to MSVC is not trivial. Installing cygwin or even Linux would be easier and it has been tested already. The same matters DIEHARD and TESTU01 also. So of course this answer cannot be accepted, but perhaps it motivates you to keep alternatives in mind.
More Answers (2)
Peter Perkins
on 14 Jan 2013
Brad, if your goal is to run Dieharder, I can't help.
If your goal is to verify that the generators in MATLAB pass stringent tests of randomness, then you'll find that L'Ecuyer and Simard published a paper a few years back that includes results for their TestU01 suite on a wide variety of generators, including mt19937ar, mrg32k3a, and mlfg6331, the recommended current generators in MATLAB.
Hope this helps.
6 Comments
Jan Pospisil
on 25 Feb 2013
One of my student tested the generators in his bachelor thesis, he used the generators in Matlab as well as the true random generator /dev/urandom in linux systems, then he exported the numbers for dieharder and run all the dieharder tests. If you are interested, I can send you the PDF.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!