[R] Help,Suggest me some methods to identify training set and test set!!!
Steve Lianoglou
mailinglist.honeypot at gmail.com
Mon Dec 21 17:25:29 CET 2009
Hi,
On Mon, Dec 21, 2009 at 9:09 AM, bbslover <dluthm at 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 give me
> some R code.
>
> and I see some ways like using SOM to project whole independents to
> 2-dimensions and find some to be training set and others are test set. like
> below. I also want to do this. and my date is in xls accessory. Please help
> me. and excel file is 218*47 matrix, 47 are indepents. I want to project it
> to 2D and label the corresponding sample label like that picture below.
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
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list