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
: 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
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
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,]