This function is a data splitting function for k-fold cross-
validation and uses a stratified random sampling technique. It resamples the
training data based on sample quantiles.
Usage
datasplit(trainy, k.fold = 10)
Value
A list of samples each with an index of k-fold number.
Arguments
trainy
a vector of response, must have a length equal to sample size.
k.fold
integer; number of folds in the cross-validation. if > 1,
then apply k-fold cross validation; the default is 10, i.e., 10-fold cross
validation that is recommended.
Author
Jin Li
References
A. Liaw and M. Wiener (2002). Classification and Regression
by randomForest. R News 2(3), 18-22.