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 care
> 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 simil
Hi,
On Mon, Dec 21, 2009 at 9:09 AM, bbslover 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 give me
> some
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),]
4 matches
Mail list logo