search for: random_values

Displaying 11 results from an estimated 11 matches for "random_values".

2017 Nov 03
1
Extreme bunching of random values from runif with Mersenne-Twister seed
..." integer vector by hand. > seeds = c(86548915L, 86551615L, 86566163L, 86577411L, 86584144L, 86584272L, + 86620568L, 86724613L, 86756002L, 86768593L, 86772411L, 86781516L, + 86794389L, 86805854L, 86814600L, 86835092L, 86874179L, 86876466L, + 86901193L, 86987847L, 86988080L) > > random_values = sapply(seeds, function(x) { + set.seed(x) + y = runif(1, 17, 26) + return(y) + }) > > summary(random_values) Min. 1st Qu. Median Mean 3rd Qu. Max. 25.13 25.36 25.66 25.58 25.83 25.94 > > We are facing a weird situation in our code when using R's...
2017 Nov 03
5
Extreme bunching of random values from runif with Mersenne-Twister seed
...ot;86756002", "86768593", "86772411", "86781516", "86794389", "86805854", "86814600", "86835092", "86874179", "86876466", "86901193", "86987847", "86988080") random_values = sapply(seeds, function(x) { set.seed(x) y = runif(1, 17, 26) return(y) }) This gives values that are **extremely** bunched together. > summary(random_values) Min. 1st Qu. Median Mean 3rd Qu. Max. 25.13 25.36 25.66 25.58 25.83 25.94 Thi...
2005 Jul 26
3
Generating unique random tokens for ActiveRecord objects
I have an ActiveRecord subclass that needs to generate a random (hard to guess) token for each record in its corresponding table. Currently I''m doing something like this: def before_create self[''token''] = random_value while self.class.find_by_token(self[''token'']) self[''token''] = random_value
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
...ot;86772411", >> "86781516", "86794389", "86805854", "86814600", "86835092", >> "86874179", >> "86876466", "86901193", "86987847", "86988080") >> >> random_values = sapply(seeds, function(x) { >> set.seed(x) >> y = runif(1, 17, 26) >> return(y) >> }) >> >> This gives values that are **extremely** bunched together. >> >> > summary(random_values) >> Min. 1st Qu. Median...
2017 Nov 03
0
Extreme bunching of random values from runif with Mersenne-Twister seed
...uot;86768593", "86772411", > "86781516", "86794389", "86805854", "86814600", > "86835092", "86874179", "86876466", "86901193", > "86987847", "86988080") > random_values = sapply(seeds, function(x) { > set.seed(x) > y = runif(1, 17, 26) > return(y) > }) Why do you do that? 1) You should set the seed *once*, not multiple times in one simulation. 2) Assuming that your strings are correctly translated to integers and the same on...
2017 Nov 03
0
Extreme bunching of random values from runif with Mersenne-Twister seed
...8593", > "86772411", > "86781516", "86794389", "86805854", "86814600", "86835092", > "86874179", > "86876466", "86901193", "86987847", "86988080") > > random_values = sapply(seeds, function(x) { > set.seed(x) > y = runif(1, 17, 26) > return(y) > }) > > This gives values that are **extremely** bunched together. > > > summary(random_values) > Min. 1st Qu. Median Mean 3rd Qu. Max. > 25...
2017 Nov 03
2
Extreme bunching of random values from runif with Mersenne-Twister seed
..."86781516", "86794389", "86805854", "86814600", "86835092", >>>> "86874179", >>>> "86876466", "86901193", "86987847", "86988080") >>>> >>>> random_values = sapply(seeds, function(x) { >>>> set.seed(x) >>>> y = runif(1, 17, 26) >>>> return(y) >>>> }) >>>> >>>> This gives values that are **extremely** bunched together. >>>> >>>> &g...
2017 Nov 03
0
Extreme bunching of random values from runif with Mersenne-Twister seed
...gt;>> "86781516", "86794389", "86805854", "86814600", "86835092", >>> "86874179", >>> "86876466", "86901193", "86987847", "86988080") >>> >>> random_values = sapply(seeds, function(x) { >>> set.seed(x) >>> y = runif(1, 17, 26) >>> return(y) >>> }) >>> >>> This gives values that are **extremely** bunched together. >>> >>> > summary(random_values) >&g...
2017 Nov 05
0
Extreme bunching of random values from runif with Mersenne-Twister seed
...uot;, "86794389", "86805854", "86814600", "86835092", >>>>> "86874179", >>>>> "86876466", "86901193", "86987847", "86988080") >>>>> >>>>> random_values = sapply(seeds, function(x) { >>>>> set.seed(x) >>>>> y = runif(1, 17, 26) >>>>> return(y) >>>>> }) >>>>> >>>>> This gives values that are **extremely** bunched together. >>>...
2017 Nov 04
0
Extreme bunching of random values from runif with Mersenne-Twister seed
...; > seeds = c(86548915L, 86551615L, 86566163L, 86577411L, 86584144L, > 86584272L, > + 86620568L, 86724613L, 86756002L, 86768593L, 86772411L, 86781516L, > + 86794389L, 86805854L, 86814600L, 86835092L, 86874179L, 86876466L, > + 86901193L, 86987847L, 86988080L) > > > > random_values = sapply(seeds, function(x) { > + set.seed(x) > + y = runif(1, 17, 26) > + return(y) > + }) > > > > summary(random_values) > Min. 1st Qu. Median Mean 3rd Qu. Max. > 25.13 25.36 25.66 25.58 25.83 25.94
2010 Jun 02
0
Multiple threads writing to the same Starling queue doesn't work?
Hi guys, I can''t find a clear answer to this: is it possible/correct to have several threads write to the same Starling queue at the "same time"? It doesn''t seem reliable according to my tests - but maybe I am doing something wrong. If I do: def test_starling FooWorker.asynch_foo_test(:my_id => ''foo'') temp = [] for i in 1..1000 temp