Description Usage Arguments Value Author(s) References
the whole dataset is split into multiple folds randomly (batch=NULL
) or according to the batch information (batch
is specified). The number of folds are defined by nFold
in the former case. In the latter case, data belonging to each batch is used as one fold if nBatch=0
, otherwise the dataset is split into nBatch
folds according to the batch information (i.e., data from the same batch will be used exclusively in one fold).
1 2 3 |
ixData |
a vector of integers, demonstrating the indices of spectra. |
batch |
a vector of sample identifications (e.g., batch/patient ID), must be the same length as |
nBatch |
an integer, the number of data folds in case of batch-wise cross-validaiton (if |
nFold |
an integer, the number of data folds in case of normal k-fold cross-validaiton. Ignored if |
verbose |
a boolean value, if or not to print out the logging info. |
seed |
an integer, if given, will be used as the random seed to split the data in case of k-fold cross-validation. Ignored if |
a list, of which each element representing the indices of the sample belonging to one fold.
Shuxia Guo, Thomas Bocklitz, Juergen Popp
S. Guo, T. Bocklitz, et al., Common mistakes in cross-validating classification models. Analytical methods 2017, 9 (30): 4410-4417.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.