Description Usage Arguments Details Value Author(s) See Also
View source: R/tdmReadAndSplit.r
Read the task data using tdmReadDataset
and split them into a test part and
a training/validation-part and return a TDMdata
object.
1 | tdmReadAndSplit(opts, tdm, nExp = 0, dset = NULL)
|
opts |
a list from which we need here the elements
|
tdm |
a list from which we need here the elements
|
nExp |
[0] experiment counter, used to select a reproducible different seed, if |
dset |
[NULL] if non-NULL, reading of dset is skipped and the given data frame dset is used. |
If dset
is NULL, the files specified in opts
are read into dset, see
tdmReadDataset
for details. Then, depending on the value of tdm$umode
"SP_T"
: split the data randomly into training and test data with test
set fraction according to opts$TST.testFrac
. Make use of tdm$SPLIT.SEED
and tdm$stratified
, if given. Set TST.COL to "tdmSplit"
.
"RSUB", "CV"
: use all data for training/validation. That is, the
training-validation split is done later in tdmClassifyLoop
or
tdmRegressLoop
.
"TST"
: split the data into training and test data according to column.
opts$TST.COL
(usually "TST.COL"
), which carries a 1 for each test record and a 0 else.
If opts$filetest
is specified, then all records from this file will
carry a 1 in opts$TST.COL
. All records from opts$filename
carry a 0.
dataObj
, either NULL (if opts$READ.INI==FALSE
) or an object of class TDMdata
containing
dset |
a data frame with the complete data set |
TST.COL |
string, the name of the column in |
filename |
|
Use the accessor functions dsetTrnVa.TDMdata
and dsetTest.TDMdata
to extract the train/vali and
the test data, resp., from dataObj
.
Known caller: tdmBigLoop
Wolfgang Konen (wolfgang.konen@th-koeln.de), THK
dsetTrnVa.TDMdata
, dsetTest.TDMdata
, tdmReadDataset
, tdmBigLoop
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.