Displaying 20 results from an estimated 1200 matches similar to: "Random Seed Location"
2018 Mar 04
0
Random Seed Location
Thank you, everybody, who replied! I appreciate your valuable advise! I will move the location of the set.seed() command to after all packages have been installed and loaded.
Best regards,
Gary
Sent from my iPad
> On Mar 4, 2018, at 12:18 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>
> On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net>
>
2018 Mar 04
2
Random Seed Location
The following helps identify when .GlobalEnv$.Random.seed has changed:
rng_tracker <- local({
last <- .GlobalEnv$.Random.seed
function(...) {
curr <- .GlobalEnv$.Random.seed
if (!identical(curr, last)) {
warning(".Random.seed changed")
last <<- curr
}
TRUE
}
})
addTaskCallback(rng_tracker, name = "RNG tracker")
EXAMPLE:
>
2018 Feb 26
3
Random Seed Location
Hi all,
For some odd reason when running na?ve bayes, k-NN, etc., I get slightly
different results (e.g., error rates, classification probabilities) from run
to run even though I am using the same random seed.
Nothing else (input-wise) is changing, but my results are somewhat different
from run to run. The only randomness should be in the partitioning, and I
have set the seed before this
2018 Feb 27
0
Random Seed Location
In case you don't get an answer from someone more knowledgeable:
1. I don't know.
2. But it is possible that other packages that are loaded after set.seed()
fool with the RNG.
3. So I would call set.seed just before you invoke each random number
generation to be safe.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking
2018 Mar 04
0
Random Seed Location
On 04/03/2018 5:54 PM, Henrik Bengtsson wrote:
> The following helps identify when .GlobalEnv$.Random.seed has changed:
>
> rng_tracker <- local({
> last <- .GlobalEnv$.Random.seed
> function(...) {
> curr <- .GlobalEnv$.Random.seed
> if (!identical(curr, last)) {
> warning(".Random.seed changed")
> last <<- curr
2018 Mar 05
1
Random Seed Location
On Sun, Mar 4, 2018 at 3:23 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 04/03/2018 5:54 PM, Henrik Bengtsson wrote:
>>
>> The following helps identify when .GlobalEnv$.Random.seed has changed:
>>
>> rng_tracker <- local({
>> last <- .GlobalEnv$.Random.seed
>> function(...) {
>> curr <- .GlobalEnv$.Random.seed
2018 Feb 24
3
Regression Tree Questions
Hi All,
I'm a newbie and have two questions. Please pardon me if they are very basic.
1. I'm using a regression tree to predict the selling prices of 10 new records (homes). The following code is resulting in an error message: pred <- predict(model, newdata = outOfSample[, -6])
The error message is:
Error in model.frame.default(Terms, newdata, na.action = na.action, xlev =
2009 Oct 20
2
LDA Precdict - Seems to be predicting on the Training Data
When I import a simple dataset, run LDA, and then try to use the model to
forecast out of sample data, I get a forecast for the training set not the
out of sample set. Others have posted this question, but I do not see the
answers to their posts.
Here is some sample data:
Date Names v1 v2 v3 c1
1/31/2009 Name1 0.714472361 0.902552278 0.783353694 a
1/31/2009 Name2 0.512158919 0.770451596
2007 Aug 21
1
clusterCall with replicate function
I am trying to run a monte carlo process using snow with a MPI cluster. I
have ~thirty processors to run the algorithm on and I want to run it 5000
times and take the average of the output. A very simple way to do this is
to divide 5000 by the number of processors to get a number n and tell each
processor to run the algorithm n times. I realize there are more efficient
ways to manage the
2005 Dec 01
1
Snow & rvpm
At office, using the internal LAN at my disposal, I'm having a go at parallel
computing - to begin with - with pvm, rpvm & snow.
The two boxes are as follows
Remote machine uffbsd:
CPU: Intel(R) Pentium(R) 4 CPU 2.00GHz (1994.13-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0xf24 Stepping = 4
real memory = 260046848 (248 MB)
This machine NbBSD:
CPU: Mobile Intel(R)
2006 Oct 13
3
Rmpi performance
Dear R users,
we are trying to do some parallel computing using library(snow).
In particular we have a cluster with 3 nodes
>cl <- makeCluster(3, type = "MPI")
3 slaves are spawned successfully. 0 failed.
and we want to compute the function op_mat (see below) first with the
master and then with the cluster using system.time for checking the
computational performance.
2010 Aug 25
2
Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "
Hi all,
I am trying to use snow package to do a parallel MCMC. I have read a few
guides and articles, the following is that I came up with.
When I run it I got the error message:
Error in checkForRemoteErrors(lapply(cl, recvResult)) :
4 nodes produced errors; first error: could not find function "ui.Next"
The data is a longitudinal data with few repeated readings on a number of
2012 Aug 08
1
random number generator with SNOW/ Parallel/ foreach
Dear All,
I have three classes of questions about generating random numbers with
different packages (windows xp 32bit R).
.
1. Suppose I would like to use package *foreach*, can I use current
Sys.time as a seed?
Although I can get the time up to1e-6 second precesion, the code below dose
not work well on a local machine with two cores. #################
library(foreach)
library(snow)
2011 Feb 03
1
problem with parLapply from snow
Hi,
The following function use to work, but now it doesn't giving the error
"> CallSnow(, 100)
Using snow package, asking for 2 nodes
2 slaves are spawned successfully. 0 failed.
Error in checkForRemoteErrors(val) :
2 nodes produced errors; first error: no applicable method for 'lapply' applied to an object of class "list"
".
Where this is the
2006 Mar 13
1
Parallel computing with the snow package: external file I/O possible?
Hello,
I am trying to do model autocalibration using the snow and rgenoud
packages. The function I want to run in task-parallel fashion across
multiple machines is one that pre- and post-processes data and runs an
external model code. My problem is that external file I/O is happening
only in the master node and not in the slaves. I have followed Jasjeet
Sekhon's suggestion to test the
2006 Apr 20
1
Parallel computing with the snow package: external file I/O possible?
Hello,
After getting help to solve part of my problem and some delay on my
part, I am posting a more refined version to see if someone can help me
further. I am trying to autocalibrate a model in my subject area using
the snow and rgenoud packages. I want to use the key function "fn" that
is called by genoud() to finalize input, run the model executable, and
compute the objective
2008 Sep 30
1
prblems changing directory in mpi snow clusters
Dear R Users,
I am attempting to use snow with rmpi.
My configuration is:
- R Version 2.7.2, rmpi
- RMPI 0.5-6
- DeinoMPI 1.1.0
- Windows Xp SP2
I can sucessfully create a cluster and execute simple commands but for
some reason, I cannot change the working directory in my nodes.
> noclusters<-2
> cl <- makeCluster(noclusters, type = "MPI")
2 slaves are spawned
2006 Apr 04
1
Mpirun with R CMD scripts
Hi,
I am working on a 64-bit rocks cluster and am relatively new to the
R package. I am trying to get Snow working with R and Rmpi and have
run into the following issue. R is able to load the Rmpi and snow
libraries and is able to run simple commands both interactively and
batch as follows:
-------------------------------------------------------------------------------------------------------
2010 Dec 02
1
parLapply - Error in do.call("fun", lapply(args, enquote)) : could not find function "fun"
Hello everybody,
I've got a bit of a problem with parLapply that's left me scratching my head
today. I've tried this in R 2.11 and the 23 bit Revolution R Enterprise and
gotten the same result, OS in question is Windows XP, the package involved
is the snow package.
I've got a list of 20 rain/no rain (1/0) situations for these two stations i
and j, all the items in this list look
2002 Aug 19
4
question about Rpvm, SNOW, etc.
Dear R-devel,
Inspired by Michael Li's talk at JSM, I decided to try rpvm and snow on our
two linux boxes. It only took me a couple of hours of screwing around to
get it working (sooner if I had RTFM).
Our setup is: 2 dual PIII-866 Xeons, one with 2GB RDRAM, the other with
1.28GB RDRAM. The first machine is acting as the NIS/NFS server. both /usr
and /home are exported to the second