Cross validation
1
0
Entering edit mode
Li Xiao ▴ 10
@li-xiao-2319
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070813/ 12c9d510/attachment.pl
• 545 views
ADD COMMENT
0
Entering edit mode
Ido M. Tamir ▴ 320
@ido-m-tamir-1268
Last seen 9.7 years ago
On Monday 13 August 2007 04:25, Li Xiao wrote: > Hi ALL, > > How to randomly divide my sample (a data.frame) into ten separate equal > sets for cross validation? > > Thanks > LiXiao sz <- 10 df <- data.frame(label=1:100,score=rnorm(100)) dfrand <- df[sample(1:nrow(df)),] dfsplit <- split(dfrand,rep(1:sz,nrow(df)/sz)) best wishes ido
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070813/ 4ad7f5fa/attachment.pl
ADD REPLY

Login before adding your answer.

Traffic: 501 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6