search for: rand

Displaying 20 results from an estimated 1075 matches for "rand".

Did you mean: and
2013 Feb 01
1
the word "rand" comes up in console after typing a command
Hi list, I keep on getting this "rand" word come up on my console. It shows up maybe one out 20 times I type in R console. I don't understand why it is coming up? > mean(variables) [1] -0.41 rand rand rand rand rand rand rand rand rand rand rand rand rand rand rand> mean(variables) > rm(list=ls()) rand rand r...
2014 Nov 02
1
Building R package: “Found 'rand', possibly from 'rand' (C)” NOTE when checking package
I am building a package that makes a simple visualization. A part of the code is in C++, and utilizes the functions srand() and rand() for purposes not related to statistics (introducing random noise in the visualization). The package compiles without problems on my workstation(s), but when I submitted it to the winbuilder service, I got the following weird message: * checking compiled code ... NOTE File 'tagclou...
2007 Jun 19
3
another issue with highlighting
...issue. (about the first one "range search and highlighting", i received no response. I don''t even know if somebody tried to reproduce and/or if it''s normal behavior) about the new issue, an example will be easier for you to reproduce: I''m filling an index with random data, i try to match for "*1*" and then highlight the matched tokens. If it''s matched and not highlighted i put it in z It works as expected when there''re 100 entries (replace 500.times by 100.times), in that case z contains empty arrays. When having 500 entries it do...
2010 Feb 05
1
Incompatible types error
I'm trying to write a loop for a series of nested functions. and I get an incompatible types error when trying to run it. It's supposed to be a simulation (1000 iterations) with a random value for "rand" being chosen each time. After each rand value is chosen, the rest of the functions are evaluated with this given rand value and their "Fitness" sum value is saved and plotted against rand. let me know if you see any obvious problems. Below is the Script &quo...
2017 Aug 07
3
Has For bucle be impooved in R
Hi! I am doing a lapply and for comparaison and I get that for is faster than lapply. What I have done: n<-100000 set.seed(123) x<-rnorm(n) y<-x+rnorm(n) rand.data<-data.frame(x,y) k<-100 samples<-split(sample(1:n),rep(1:k,length=n)) res<-list() t<-Sys.time() for(i in 1:100){ modelo<-lm(y~x,rand.data[-samples[[i]]]) prediccion<-predict(modelo,rand.data[samples[[i]],]) res[[i]] <- (prediccion - rand.data$y[samples[[i]]]) }...
2010 May 28
4
vlookup in R?
Hi R-users,   I would like to search for the values of seq that match my rand values.  In excel I will use =VLOOKUP(G2,$E$2:$F$32,2).  For example, for rand=.262 it will give me approximately seq=120 and rand=0.964293344, seq=460 and etc.   E           F     G cdf         seq   rand 0.00E+00    0     0.262123478 1.56E-03    20    0.964293344 1.55E-02    40    0.494827113 5.3...
2003 Apr 07
4
4-stable and C rand()?
Hi everyone, sorry if this has been answered before - I caught a whiff of a discussion about c's rand() function in a mailing list archive, but couldn't find a definitive answer. I'm trying to do a simple CS project on my machine where I generate two sets of values in parallel using rand() and am running into infinite loops of values, and couldn't figure out why, so I wrote a test prog...
2000 Jun 19
1
configure problem on UnixWare 7.1.1
Anyone can locate what was wrong with the below problem on UnixWare 7.1.1 ? The file rand.h was finally found in one of the tests but configure still failed with ... checking for getpagesize... yes checking for OpenSSL directory... configure: error: Could not find working SSLeay / OpenSSL libraries, please install Thanh configure:2302: gcc -o conftest -g -O2 -Wall -I/usr/local/includ...
2002 Mar 12
0
OpenSSH 3.1: ssh-rand-helper
Dear openssh-developers, the new external program ssh-rand-helper appeared in OpenSSH 3.1. While the SFTP_SERVER is defined using a _PATH_SFTP_SERVER pointing to SFTP_SERVER in Makefile.in and defining a default-path in pathnames.h the ssh-rand-helper is simply SSH_RAND_HELPER and defined with a fixed path in Makefile.in and not having a default in pathnam...
2012 Dec 01
2
[LLVMdev] Use rand_r() instead of non-reentrant thread-unsafe rand() in GetRandomNumber()
...r LLVM-based compiler pipeline a major part of code generation is taken into application runtime. One side-effect of this organization is a need to be very careful about using code that might diverge application state. And we found that simple generation of temporary files over LLVM APIs introduces random noise into the program result. There reason is that LLVM's GetRandomNumber call uses rand(), that clashes with rand() used in application. Taking in account that many client applications developers may be not aware of this at all [and just complain to us, that our compiler is bad because thei...
2017 Aug 07
1
Has For bucle be impooved in R
Dear Jesus, The difference is marginal when each code chunk does the same things. Your for loop does not yields the same output as the lapply. Here is the cleaned version of your code. n<-10000 set.seed(123) x<-rnorm(n) y<-x+rnorm(n) rand.data<-data.frame(x,y) k<-100 samples <- split(sample(n), rep(seq_len(k),length=n)) library(microbenchmark) microbenchmark( "for" = { res <- vector("list", length(samples)) for(index in seq_along(samples)) { fit <- lm(y~x, data = rand.data[-samples...
2006 May 11
9
Undoing a SHA1
Hello for my password recovery system I want to recover the users password and send it to them. In the DB its saved via SHA1 (login generator) -- Posted via http://www.ruby-forum.com/.
2017 Aug 07
0
Has For bucle be impooved in R
...?s Para Fern?ndez" <j.para.fernandez at hotmail.com> wrote: >Hi! > >I am doing a lapply and for comparaison and I get that for is faster >than lapply. > > >What I have done: > > > >n<-100000 >set.seed(123) >x<-rnorm(n) >y<-x+rnorm(n) >rand.data<-data.frame(x,y) >k<-100 >samples<-split(sample(1:n),rep(1:k,length=n)) > >res<-list() >t<-Sys.time() >for(i in 1:100){ > modelo<-lm(y~x,rand.data[-samples[[i]]]) > prediccion<-predict(modelo,rand.data[samples[[i]],]) > res[[i]] <- (predicc...
2009 May 15
1
[PATCH server] provide default uuid and mac if not provided for create.
...ces/vm_service.rb index 4c29bcf..47ac5f5 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -52,15 +52,9 @@ module VmService def svc_new(vm_resource_pool_id) raise ActionError.new("VM Resource Pool is required.") unless vm_resource_pool_id - # random MAC - mac = [ 0x00, 0x16, 0x3e, rand(0x7f), rand(0xff), rand(0xff) ] - # random uuid - uuid = ["%02x"*4, "%02x"*2, "%02x"*2, "%02x"*2, "%02x"*6].join("-") % - Array.new(16) {|x| rand(0xff) } - - @vm = Vm.new({:vm_resourc...
2003 Dec 01
2
help with random numbers and Rmpi
Dear People, This may not be the right place to ask a question about Rmpi, but I don't know of a better one. I am trying to get a simple program working using Rmpi with the model of 1 R master and n C slaves. What I am trying to do is have each of the C slaves generate a random number from U[0,1], and then have the master collect all n numbers as a vector and output it. However even doing this is rather over my head. I'm trying to use rsprng and sprng, but I am sure what I am currently doing is wrong. I enclose a first attempt. Any suggestions would be appreciated....
2011 May 03
1
Revised: Portable OpenSSH security advisory: portable-keysign-rand-helper.adv
OpenSSH Security Advisory: portable-keysign-rand-helper.adv This document may be found at: http://www.openssh.com/txt/portable-keysign-rand-helper.adv 1. Vulnerability Portable OpenSSH's ssh-keysign utility may allow unauthorised local access to host keys on platforms if ssh-rand-helper is used. 2. Affected configu...
2012 Dec 01
2
[LLVMdev] Use rand_r() instead of non-reentrant thread-unsafe rand() in GetRandomNumber()
Agreed, done. One thing I'm not sure about is this statement in docs: POSIX.1-2008 marks *rand_r*() as obsolete. - And... what is the replacement? 2012/12/1 Justin Holewinski <justin.holewinski at gmail.com> > If we're keeping the state locally now, perhaps we should store it in a > per-thread variable. I know rand() isn't thread safe to begin with, but it > seems...
2002 Apr 01
4
path to find ssh-rand-helper
Before I actually implement the small changes needed to allow the location of ssh-rand-helper to be specified in the config file, I'd like to check that in doing so I won't be opening up a huge security hole. My brief reading of the code suggests that in entropy.c:seed_rng() the ssh-rand-helper is run as the original uid (for binaries which were setuid in the first place of...
2012 Dec 01
0
[LLVMdev] Use rand_r() instead of non-reentrant thread-unsafe rand() in GetRandomNumber()
If we're keeping the state locally now, perhaps we should store it in a per-thread variable. I know rand() isn't thread safe to begin with, but it seems like rand_r() can be since it should keep no external state. On Sat, Dec 1, 2012 at 11:17 AM, Dmitry Mikushin <dmitry at kernelgen.org>wrote: > Dear all, > > In our LLVM-based compiler pipeline a major part of code generation is...
2004 Mar 30
1
classification with nnet: handling unequal class sizes
...modification to use it for classification (see below). My data has 2 classes with unequal size: 45 observations for classI and 116 obs. for classII With CVnn2 I get the following confusion matrix (%) (average of 10 runs): predicted true 53 47 16 84 I had a similar biased confusion matrix with randomForest until I used the sampsize argument (the same holds for svm until I used the class.weights argument). How can I handle this problem of unequal class sizes with nnet, in order to get a less biased confusion matrix? (with randomForest I finally got 78 22 16 84 ) many thanks for a hint...