similar to: Trying to speed up an if/else statement in simulations

Displaying 20 results from an estimated 3000 matches similar to: "Trying to speed up an if/else statement in simulations"

2017 Aug 24
2
llvm-mc-[dis]assemble-fuzzer status?
> > > I'd like llvm-isel-fuzzer to be added once its committed consider it done (once it's there) > (which should > be as soon as LLVM fuzzers work in release builds again). One potential > issue is that llvm-isel-fuzzer is more of a collection of fuzzers, and > it needs some arguments to run (ie, to choose the backend). > I have the same problem with
2008 Dec 01
1
Maildir loses keywords in index beyond 26
(NOTE: I am not on the mailing list so please Cc: me.) dovecot-1.1.6-2.fc10.i386 (configuration not changed from stock) Fedora 10 AMD Athlon XP ext3 Maildir format doesn't store keywords in the index properly -- it goes up to 26 and then further keywords are dropped. I ran the tests with a simple script that feeds the lines from "commands" to Dovecot one at a time and waits for
2010 Apr 26
3
R.GBM package
HI, Dear Greg, I AM A NEW to GBM package. Can boosting decision tree be implemented in 'gbm' package? Or 'gbm' can only be used for regression? IF can, DO I need to combine the rpart and gbm command? Thanks so much! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2011 Jul 02
1
Simulating inhomogeneous Poisson process without loop
Dear all I want to simulate a stochastic jump variance process where N is Bernoulli with intensity lambda0 + lambda1*Vt. lambda0 is constant and lambda1 can be interpreted as a regression coefficient on the current variance level Vt. J is a scaling factor How can I rewrite this avoiding the loop structure which is very time-consuming for long simulations? for (i in 1:N){ ... N <- rbinom(n=1,
2012 Dec 19
0
[LLVMdev] LNT compile-time performance testing
There is currently no one publicly using the compile tests. We use it internally around the clock. I am not sure what Daniel's vision for the use of this externally (i.e. I am not sure how beta/non-beta he thinks this is), but regardless the way to use it is: 1. Create a directory. 2. Stick a bunch of tar balls you want into the directory. 3. Create a project_list.json file and write a
2012 Dec 19
2
[LLVMdev] LNT compile-time performance testing
Hi, I was looking at LNT's "compile" tests, listed here: $ lnt-sandbox/bin/lnt showtests Available tests: compile - Single file compile-time performance testing nt - LLVM test-suite compile and execution tests When trying to run it, I get Python exceptions in the code trying to parse the output of 'ifconfig' in order to infer my MAC address (this is on 64-bit
2011 Mar 21
1
Randomly generating data
Hi, everybody, I have a problem and need your help. There are two columns that look like this: [1,] "t" "f" [2,] "f" "t" [3,] "t" "f" [4,] "t" "t" [5,] "f" "f" I just want to generate the third column based on these two columns. First, I randomly choose one of the two columns,
2010 May 23
2
Bernoulli random variable with different probability
Dear R-helpers, I would like to generate a variable that takes 0 or 1, and each subject has different probabilities of taking the draw. So, which of the following code I should use ? suppose there are 5 subjects, and their probabilities of this Bernoulli variable is p=c(0.2, 0.9, 0.15, 0.8, 0.75) n<-5 Ber.var <- rbimon(n,1,p) ## I doubt if this will take the first probability, which is
2005 Feb 28
2
A problem about outer()
Dear all, I have something about function outer() that I can't understand. Just see the following example. The two NaNs are due to 0/0, but I can't figure out the cause of the last two errors. I wonder if some one can explain this for me. ___________________________________________________________________ > sx=rbinom(10,1,0.5);ot=rbinom(10,1,0.5);ag <- rbinom(10,100,0.3);ho <-
2010 May 07
2
glm contrasts
Hi, I have some data on the effect of cycle shape (categorical) and frequency (continuous) on the efficiency of muscle contraction. My minimum adequate model is: m15<-glm(efficiency~cycle.shape*freq, family=quasipoisson) However, I wish to know where significant differences lie between specific combinations of treatments. I guess I want an equivalent of a post hoc test following an
2012 Jun 27
1
Replacing sets of rows in matrix within a loop
Dear R-help, I am writing some simulation code to create multiple sets of time-to-event clinical trial data (for use in meta-analysis). Within each trial, I want to apply censoring via simulation of uniform variables (with minimum zero and maximum the median outcome time for that particular trial). I have started by pre-allocating a matrix which has 3 columns; one for trial number, one for
2006 Jun 27
2
Random numbers negatively correlated?
Dear list, I did simulations in which I generated 10000 independent Bernoulli(0.5)-sequences of length 100. I estimated p for each sequence and I also estimated the conditional probability that a one is followed by another one (which should be p as well). However, the second probability is significantly smaller than 0.5 (namely about 0.494, see below) and of course smaller than the direct
2011 Jul 25
1
Problem with random number simulation
Hi this is my first post. I am trying to run a simulation for a computer playing Von Neumann poker and adjusting it's expectation of an opponent's behavior according to how the opponent plays. This program involves random generation of "hands" and shifting of parameters. However, when I run the code, no errors come up, but the program doesn't do anything. Could someone
2017 Aug 24
2
llvm-mc-[dis]assemble-fuzzer status?
On Tue, Aug 22, 2017 at 4:34 PM, Kostya Serebryany <kcc at google.com> wrote: > > > On Tue, Aug 22, 2017 at 4:21 PM, George Karpenkov <ekarpenkov at apple.com> > wrote: > >> Hi, >> >> As a part of a recent move of libFuzzer from LLVM to compiler-rt I am >> looking into updating the build code >> for the libraries which use libFuzzer.
2000 Aug 30
3
family question
Dear friends. Please see the program below and answer if it does simulate a population of 1.000.000 families, each with at max 20000 children (typical in Denmark, you know), constructed such that each family stops having children when more boys than girls are present ? Equal numbers of boys and girls are got in the population, according to the simulation, is that obvious ? ND <- NP <-
2012 Sep 27
2
Generating an autocorrelated binary variable
Hi R-fellows, I am trying to simulate a multivariate correlated sample via the Gaussian copula method. One variable is a binary variable, that should be autocorrelated. The autocorrelation should be rho = 0.2. Furthermore, the overall probability to get either outcome of the binary variable should be 0.5. Below you can see the R code (I use for simplicity a diagonal matrix in rmvnorm even if it
2005 Jul 15
2
glm(family=binomial(link=logit))
Hi I am trying to make glm() work to analyze a toy logit system. I have a dataframe with x and y independent variables. I have L=1+x-y (ie coefficients 1,1,-1) then if I have a logit relation with L=log(p/(1-p)), p=1/(1+exp(L)). If I interpret "p" as the probability of success in a Bernouilli trial, and I can observe the result (0 for "no", 1 for
2009 Mar 28
1
Error in R??
Can someone explain why I am getting the following error: in the r code below? Error in solve.default(diag(2) + ((1/currvar) * (XX1 %*% t(XX1)))) : system is computationally singular: reciprocal condition number = 0 In addition: There were 50 or more warnings (use warnings() to see the first 50) The R code is part of a bigger program. ##sample from full conditional
2001 Jul 25
2
using compiled fortran in R
Hi, I would like to use a Fortran subroutine in R. I have checked the R docs and Newsletter, but..., I am unable to load an object file into R. The steps I have taken are (on Debian Linux/recent Intel-type chip ): 1. g77 -c hello.f to create hello.o 2. mymachine> R to start R 3. > dyn.load("hello.o") at which point I am getting the error msg: Error in
2006 Aug 31
3
what's wrong with my simulation programs on logistic regression
Dear friends, I'm doing a simulation on logistic regression model, but the programs can't work well,please help me to correct it and give some suggestions. My programs: data<-matrix(rnorm(400),ncol=8) #sample size is 50 data<-data.frame(data) names(data)<-c(paste("x",1:8,sep="")) #8 independent variables,x1-x8; #logistic regression model is