Re: [R] how to control the sampling to make each sample unique

2007-05-10 Thread HelponR
ethz.ch > *Sent:* Thursday, May 10, 2007 4:47 PM > *Subject:* Re: [R] how to control the sampling to make each sample unique > > > Yeah, I want to get all unique combinations of choosing ntest from ntotal. > > for example, choosing 4000 training data from 10,000 total data. > &

Re: [R] how to control the sampling to make each sample unique

2007-05-10 Thread HelponR
Yeah, I want to get all unique combinations of choosing ntest from ntotal. for example, choosing 4000 training data from 10,000 total data. Suppose they are sequenced as 1:10,000 One obvious combination is 1:4000 Then I run sample ((1:1000), 4000) it may output 4000 numbers: 1, 3, 5, 79

Re: [R] how to control the sampling to make each sample unique

2007-05-10 Thread Rory Martin
I think you're asking a design question about a Monte Carlo simulation. You have a "population" (size 10,000) from which you're defining an empirical distribution, and you're sampling from this to create pairs of training and test samples. You need to ensure that each specific pair of training an

Re: [R] how to control the sampling to make each sample unique

2007-05-10 Thread Vladimir Eremeev
Urania Sun wrote: > > I have a dataset of 1 records which I want to use to compare two > prediction models. > > I split the records into test dataset (size = ntest) and training dataset > (size = ntrain). Then I run the two models. > > Now I want to shuffle the data and rerun the models. I

[R] how to control the sampling to make each sample unique

2007-05-09 Thread HelponR
I have a dataset of 1 records which I want to use to compare two prediction models. I split the records into test dataset (size = ntest) and training dataset (size = ntrain). Then I run the two models. Now I want to shuffle the data and rerun the models. I want many shuffles. I know that the