similar to: set.seed ( ) function

Displaying 20 results from an estimated 10000 matches similar to: "set.seed ( ) function"

2011 May 07
5
plotting confidence bands from predict.nls
I am trying to find a confidence band for a fitted non-linear curve. I see that the predict.nls function has an interval argument, but a previous post indicates that this argument has not been implemented. Is this still true? I have tried various ways to extract the interval information from the model object without success. My code is: Model.predict <- predict(My.nls.model,
2009 Nov 16
2
(Parallel) Random number seed question...
Hi All, I have k identical parallel pieces of code running, each using n.rand random numbers.? I would like to use the same RNG (for now), and set the seeds so that I can guarantee that there are no overlaps in the random numbers sampled by the k pieces of code.? Another side goal is to have reproducibility of my results.? In?the past I have used C with SPRNG for this task, but I'm hoping
2004 Jun 09
4
how to initialize random seed properly ?
I want to start R processes on multiple processors from single shell script and I want all of them to have different random seeds. One way of doing this is sleep 2 # (with 'sleep 1' I am often getting the same number) ... set.seed(unclass(Sys.time())) Is there a simpler way without a need to sleep between invoking different R processes ? Ryszard
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.
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
Hi, I am constructing a function that does sampling in C++ using a non-R RNG stream for thread safety reasons. This C++ 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
2017 Nov 03
1
Extreme bunching of random values from runif with Mersenne-Twister seed
Martin, Thanks for the helpful reply. Alas I had forgotten that (implied) unfavorable comparisons of *nix systems with Windows systems would likely draw irate (but always substantive) responses on the R-devel list -- poor phrasing on my part. :) Regardless, let me try to address some of the concerns related to the construction of the MRE itself and try to see if we can clean away the shrubbery
2013 Apr 21
5
Where to find info about seed.rb, db:seed functionality?
There is no any mention about it neither in API nor in Guide. How to use these features? The only gist with two sentences is in db/seed.rb file. That''s really not enough. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails
2020 Jul 30
3
Seeding non-R RNG with numbers from R's RNG stream
Thank you for this. I'd like to be sure I understand the intuition correctly. Is the following true from what you said? I can just fix the seed at the C++ level and the results will still be (pseudo) random because the initialization at the R level is (pseudo) random. On Thu, Jul 30, 2020 at 3:36 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > I wouldn't trust the C++
2019 Oct 30
2
set.seed() in a package
Hi all, I recently found several calls of set.seed() in a CRAN package. These calls are in a plot function, which could lead to unexpected behaviour. See https://github.com/sammo3182/interplot/issues/33 <https://github.com/sammo3182/interplot/issues/33> for a description of the problem. I checked the CRAN repository policies and could not find anything about this. I would have expected a
2012 Jan 06
1
How to properly re-set a saved seed? I've got the answer, but no explanation
Hello, happy new year. I've come back to a problem from last spring. I need to understand what what is the technically correct method to save a seed and then re-set it. Although this example arises in the context of MT19937, I'm needing to do this with other generators as well, including L'Ecuyer streams. The puzzle is this comment in ?Random: "?set.seed? is the recommended way
2009 May 02
2
set.seed and /dev/random
Hello, In ?set.seed I notice that a seed is created from the system time. Thus if two machines were (hypothetically) running for the same time and R was started simultaneously 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
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
Bill, Appreciate the point that both you and Serguei are making, but the sequence in question is not a selected or filtered set. These are values as observed in a sequence from a mechanism described below. The probabilities required to generate this exact sequence in the wild seem staggering to me. T On Fri, Nov 3, 2017 at 11:27 PM, William Dunlap <wdunlap at tibco.com> wrote: >
2017 Dec 08
2
Curiously short cycles in iterated permutations with the same seed
I have noticed that when I iterate permutations of short vectors with the same seed, the cycle lengths are much shorter than I would expect by chance. For example: X <- 1:10 Xorig <- X start <- 112358 N <- 10 for (i in 1:N) { seed <- start + i for (j in 1:1000) { # Maximum cycle length to consider set.seed(seed) # Re-seed RNG to same initial state X <- sample(X)
2011 Aug 04
1
How to seed the R random number generator in C (standalone) with an instance of .Random.seed
hello all, I use the R standalone math library in my own C program, and the default R random number generator can be seeded with set_seed(const unsigned int, const unsigned int). How could I seed the RNG with an instance of .Random.seed ? I would need this or a similar workaround for debugging purposes. More precisely, I use the default R random number generator to sample from various
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
Bill, I have clarified this on SO, and I will copy that clarification in here: "Sure, we tested them on other 8-digit numbers as well & we could not replicate. However, these are honest-to-goodness numbers generated by a non-adversarial system that has no conception of these numbers being used for anything other than a unique key for an entity -- these are not a specially constructed
2009 Nov 17
2
rake db:seed with authlogic fails to populate users
I have a db/seeds.rb file that I want to load, but while the rest of the seeds file works fine, nothing is ever populated in :users. I just fails silently, so I can''t figure out what exactly is causing the problem. I have authlogic installed into the user.rb model with acts_as_authentic. I''m sure that''s part of the problem, but I''m not sure that manually
2017 Nov 03
5
Extreme bunching of random values from runif with Mersenne-Twister seed
This is cross-posted from SO (https://stackoverflow.com/q/47079702/1414455), but I now feel that this needs someone from R-Devel to help understand why this is happening. We are facing a weird situation in our code when using R's [`runif`][1] and setting seed with `set.seed` with the `kind = NULL` option (which resolves, unless I am mistaken, to `kind = "default"`; the default being
2019 Oct 30
2
set.seed() in a package
We commit a similar sin in the help pages, e.g. example(set.seed) ; runif(2) example(set.seed) ; runif(2) gives you the same random uniforms both times. (Of course it isn't that much of an issue, since you would rarely be running examples before any serious simulations.) You can fairly easily work around that by saving and restoring .Random.seed. I wonder if that isn't also true of the
2017 Dec 08
0
Curiously short cycles in iterated permutations with the same seed
Hi Boris, Do a search on "the order of elements of the symmetric group". (This search will also turn up homework questions and solutions.) You will understand why you are seeing this once you understand how a permutation is decomposed into cycles and how the order relates to a partition of n (n=10 in your case). Enjoy! Eric On Fri, Dec 8, 2017 at 6:39 AM, Boris Steipe <boris.steipe
2020 Jan 02
4
u2f seed
In the u2f protocol, my understanding is in the normal case, the web browser seeds the keypair process with the hostname of the remote server. In the case of ssh, the hostname is probably not what I would want to do. But the u2f protocol seems to have a way to handle this. It just needs to be exposed to the user. The content of the private keyfile in ssh is generated somehow. Where is that done?