Description Usage Arguments Details Value Examples
View source: R/splitTestTrain_partition.R
Assign train/test labels over several resamplings of the data.
1 | splitTestTrain_resampling(pheno_DF, nFold = 3L, predClass, verbose = FALSE)
|
pheno_DF |
(data.frame) table with patient ID and status.
Must contain columns for Patient ID (named 'ID') and class
(named 'STATUS'). Status should be a char; value of predictor class
should be specified in |
nFold |
(integer) number of resamplings. Each sample will be a test sample exactly once. |
predClass |
(char) name of predictor class |
verbose |
(logical) print messages |
This function is useful when feature selection needs to occur over multiple resamplings of the data, as a strategy to reduce overfitting. Each sample serves as a test for exactly one resampilng, and as a training sample for the others. The method is provided with the positive label and splits the samples so that an even number of positive and negative classes are represented in all the resamplings (i.e. it avoids the situation where one resampling has too many positives and another has too few).
(list) of length nFold, each with char vector of length nrow(pheno_DF). Values of 'TRAIN' or 'TEST'
1 2 | data(pheno)
x <- splitTestTrain_resampling(pheno,predClass='LumA')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.