[R] calibration/validation sets

2004-08-14 Thread Peyuco Porras Porras .
Hi; Does anyone know how to create a calibration and validation set from a particular dataset? I have a dataframe with nearly 20,000 rows! and I would like to select (randomly) a subset from the original dataset (...I found how to do that) to use as calibration set. However, I don't know how

RE: [R] calibration/validation sets

2004-08-14 Thread Austin, Matt
: Saturday, August 14, 2004 17:15 PM To: [EMAIL PROTECTED] Subject: [R] calibration/validation sets Importance: High Hi; Does anyone know how to create a calibration and validation set from a particular dataset? I have a dataframe with nearly 20,000 rows! and I would like to select (randomly) a subset

Re: [R] calibration/validation sets

2004-08-14 Thread Kevin Wang
Hi, On Sat, 14 Aug 2004, Peyuco Porras Porras . wrote: Hi; Does anyone know how to create a calibration and validation set from a particular dataset? I have a dataframe with nearly 20,000 rows! and I would like to select (randomly) a subset from the original dataset (...I found how to do

RE: [R] calibration/validation sets

2004-08-14 Thread Liaw, Andy
There are many ways to do this. One example, supposing your data is in `myData': ## randomly pick 1/3 for validation: valid.idx - sample(nrow(myData), round(nrow(myData)/3), replace=FALSE) ## training set: myData.tr - myData[-valid.idx,] ## validation set: myData.valid - myData[valid.idx,]