Re: [R] Help,Suggest me some methods to identify tr aining set and test set!!!

2009-12-21 Thread milton ruser
Not ellegant.. but... MyDF-data.frame(cbind(x=runif(10), y=rnorm(10))) TrainingSize=5 TrainingSize_list-sample(1:nrow(MyDF))[1:TrainingSize] TrainingSize_list MyDF.training-MyDF[(1:nrow(MyDF) %in% TrainingSize_list),] MyDF.training MyDF.test-MyDF[ ! (1:nrow(MyDF) %in% TrainingSize_list),]

Re: [R] Help,Suggest me some methods to identify tr aining set and test set!!!

2009-12-21 Thread Steve Lianoglou
Hi, On Mon, Dec 21, 2009 at 9:09 AM, bbslover dlu...@yeah.net wrote: I want to split my whole dateset to training set and test set, building model in training set, and validate model using test set. Now, How can I split my dataset to them reasonally. Please give me a hand, It is better to

Re: [R] Help,Suggest me some methods to identify tr aining set and test set!!!

2009-12-21 Thread Max Kuhn
I noticed Max already pointed you to the caret package. Load the library and look at the help for the createFolds function, eg: library(caret) ?createFolds I think that the createDataPartition function in caret might work better for you. There are a number of other packages with similar

Re: [R] Help,Suggest me some methods to identify tr aining set and test set!!!

2009-12-21 Thread bbslover
Thank you for all help. It is helpful for me. Max Kuhn wrote: I noticed Max already pointed you to the caret package. Load the library and look at the help for the createFolds function, eg: library(caret) ?createFolds I think that the createDataPartition function in caret might work