search for: rngs

Displaying 20 results from an estimated 89 matches for "rngs".

Did you mean: regs
2003 Jun 13
0
Testing the R RNGs
I have applied L'Ecuyer's TESTU01 suite of RNG tests to the RNGs in R. TESTU01 offers three increasingly more stringent suites, called "Small Crush", "Crush" and "Big Crush". If a particular RNG fails Small Crush, there is no need to apply Big Crush. Below I summarize the results: Number of Tests Failed Smal...
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...function is wrapped by an R function, which is user facing. The R wrapper does some sampling itself to initialize some variables before passing them off to C++. So that my users do not have to manage two mechanisms to set random seeds, I've constructed a solution (shown below) that allows both RNGs to be seeded with set.seed and respond to the state of R's RNG stream. I believe the below works. However, I am hoping to get feedback from more experienced useRs as to whether or not the below approach is unsafe in ways that may affect reproducibility, modify global variables in bad ways, or...
2011 Aug 05
2
Question on RNG
...e offers RNG what is called as Donald E. Knuth's subtractive random number generator algorithm (found here: http://msdn.microsoft.com/en-us/library/system.random.aspx#Y12). ? Here I was wondering whether R also have same RNG in it's inventory, so looked at ?set.seed. There I found 2 related RNGs namely 'Knuth-TAOCP-2002', 'Knuth-TAOCP'. Can somebody guide me what is the most related RNG with .Net's? ? I also want to have R to draw random number from that RNG, given I set a seed. My goal is to have same set of random numbers in .Net & R, so that I can match and see a...
2020 Jul 30
3
Seeding non-R RNG with numbers from R's RNG stream
...is user facing. The R wrapper does some sampling itself > to > > initialize some variables before passing them off to C++. So that my > users > > do not have to manage two mechanisms to set random seeds, I've > constructed > > a solution (shown below) that allows both RNGs to be seeded with set.seed > > and respond to the state of R's RNG stream. > > > > I believe the below works. However, I am hoping to get feedback from more > > experienced useRs as to whether or not the below approach is unsafe in > ways > > that may affect rep...
2007 Jun 12
4
pretty report
Dear Listers: I have a couple of data frames to report and each corresponds to different condtions, e.g. conditions=c(10, 15, 20, 25). In this examples, four data frames need to be exported in a "pretty" report. I knew Perl has some module for exporting data to Excel and after googling, I found R does not. So I am wondering if there is a package in R for generating good reports. I
2000 May 25
4
Needed: Understading runif() output :-)
...numbers, but that the largest were very much larger than the second largest numbers, and that exactly the same number appeared again and again. First I thought it was a bug, and I''m sorry to have wasted r-devels time with a bug report. I started running the same simulation with different RNGs and they all seem to generate numbers in "quantized states". Then, I started to look into what runif() gives, and let it print 13 digits. In the below output, I use the "Mersenne-Twister" RNG and I have generated 1e+10 numbers (100000 at a time) and I print a line if it the num...
2018 Sep 21
1
Bias in R's random integers?
...it is safe to multiply the unif_rand() value by 2^32, and take > the whole number part as an unsigned 32 bit integer.? Depending on the > RNG in use, that will give at least 25 random bits.? (The low order bits > are the questionable ones.? 25 is just a guess, not a guarantee.) Right, the RNGs in R produce no more than 32bits, so the conversion to a double can be reverted. If we ignore those RNGs that produce less than 32bits for the moment, then the attached file contains a sample implementation (without long vectors, weighted sampling or hashing). It uses Rcpp for convenience, but I ha...
2003 Jun 12
1
Tested Random Number Generator
...andom number generator, ACM Transactions on Modeling and Computer Simulation, 8, 3-30. I looked at the paper, but essentially I have no expertise in assessing whether this random number generator is "good" (which is probably a tricky concept in the first place when dealing with RNGs). I have almost blind faith in the developers of R (at least when it comes to something so fundamental as a RNG) that I feel confident that it is good, but I guess I need something more substantial at this point to back of my beliefs! Any suggestions on how I can "show" (without having to...
2014 Sep 19
3
Standardizing an MSR or other hypercall to get an RNG seed?
..., at least, will use it. The rest are too complicated for early use. Linux on x86 plays some vaguely clever games with rdtsc and poking at the i8254 port. I think that these tricks are even less useful as a guest than they are on metal, and we can use paravirt mechanisms to make guest early boot rngs much stronger. --Andy
2014 Sep 19
3
Standardizing an MSR or other hypercall to get an RNG seed?
..., at least, will use it. The rest are too complicated for early use. Linux on x86 plays some vaguely clever games with rdtsc and poking at the i8254 port. I think that these tricks are even less useful as a guest than they are on metal, and we can use paravirt mechanisms to make guest early boot rngs much stronger. --Andy
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
...by an R > function, which is user facing. The R wrapper does some sampling itself to > initialize some variables before passing them off to C++. So that my users > do not have to manage two mechanisms to set random seeds, I've constructed > a solution (shown below) that allows both RNGs to be seeded with set.seed > and respond to the state of R's RNG stream. > > I believe the below works. However, I am hoping to get feedback from more > experienced useRs as to whether or not the below approach is unsafe in ways > that may affect reproducibility, modify global v...
2006 Aug 31
0
New package 'random' for non-deterministic random number
...utions that provide access to non-deterministic random-numbers exist, few if any are portable across all the hardware platforms R supports. Retrieving non-deterministic random numbers may be beneficial to seed parallel simulations with independent draws, to obtain portable initializations for other RNGs, to validate simulation with non-deterministic RNGs, or simply for fun and experimentations. The package contains five simple functions randomNumber (random integeres between min, max w/ duplicates) randomSequence (random sequences between min, max w/o duplicates) randomBytes (in h...
2006 Aug 31
0
New package 'random' for non-deterministic random number
...utions that provide access to non-deterministic random-numbers exist, few if any are portable across all the hardware platforms R supports. Retrieving non-deterministic random numbers may be beneficial to seed parallel simulations with independent draws, to obtain portable initializations for other RNGs, to validate simulation with non-deterministic RNGs, or simply for fun and experimentations. The package contains five simple functions randomNumber (random integeres between min, max w/ duplicates) randomSequence (random sequences between min, max w/o duplicates) randomBytes (in h...
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...so subtle as to not really be a problem as you suggest, Duncan. But I am now thinking I'll need to explicitly run some experiments to validate that. I'm 100% in agreement about not reinventing the wheel, but instead relying on the accumulated experience of the folks that are writing these RNGs. Knowing more about the bigger use, does this still strike you as obviously problematic? Best, Tommy On Thu, Jul 30, 2020 at 4:49 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 30/07/2020 4:30 p.m., Tommy Jones wrote: > > Thank you for this. I'd like to be sure I...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...essful hwrng_register(). Previously, when hwrng_register() failed, the probe() routine would fail, and the vqs would be torn down, and driver would be marked not initialized. Now, the vqs will remain initialized, driver would be marked initialized as well, but won't be available in the list of RNGs available to hwrng core. To fix the failures, the procedure remains the same, i.e. unload and re-load the module, and hope things succeed the next time around. Signed-off-by: Amit Shah <amit.shah at redhat.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> (cherry picked fro...
2014 Aug 12
3
[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready
...essful hwrng_register(). Previously, when hwrng_register() failed, the probe() routine would fail, and the vqs would be torn down, and driver would be marked not initialized. Now, the vqs will remain initialized, driver would be marked initialized as well, but won't be available in the list of RNGs available to hwrng core. To fix the failures, the procedure remains the same, i.e. unload and re-load the module, and hope things succeed the next time around. Signed-off-by: Amit Shah <amit.shah at redhat.com> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> (cherry picked fro...
2009 May 02
2
set.seed and /dev/random
...eously on both, the would have the same seeds (correct?). I assume reading from /dev/random would be different for both of these machines, so my question is why not use an integer read from /dev/random to create the seed? Would it be a portability issue? I must admit I have very little idea about RNGs, so my question is possibly very naive. Thank you Saptarshi
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
...er does some sampling > itself to > > initialize some variables before passing them off to C++. So that > my users > > do not have to manage two mechanisms to set random seeds, I've > constructed > > a solution (shown below) that allows both RNGs to be seeded with > set.seed > > and respond to the state of R's RNG stream. > > > > I believe the below works. However, I am hoping to get feedback > from more > > experienced useRs as to whether or not the below approach is > un...
2017 Nov 05
5
Extreme bunching of random values from runif with Mersenne-Twister seed
On 04/11/2017 10:20 PM, Daniel Nordlund wrote: > Tirthankar, > > "random number generators" do not produce random numbers. Any given > generator produces a fixed sequence of numbers that appear to meet > various tests of randomness. By picking a seed you enter that sequence > in a particular place and subsequent numbers in the sequence appear to > be unrelated.
2008 Aug 17
1
Wichmann-Hill Random Number Generator and the Birthday Problem
Dear all, Recently I am generating large random samples (10M) and any duplicated numbers are not desired. We tried several RNGs in R and found Wichmann-Hill did not produce duplications. The duplication problem is the interesting birthday problem. If there are M possible numbers, randomly draw N numbers from them, the average number of dupilcations D = N(N-1)/2/M. For Knuth-TAOCP and Knuth-TAOCP-2002, M=2^30, since this...