makeFolds | R Documentation |
The function randomly allocates sample indices to k numeric vectors. The length of each vector is determined as the nearest integer to the number of samples times the test fraction.
makeFolds(numSamples, k, testSplit = 0.2)
numSamples |
Integer. The number of samples to be partitioned into k folds. |
k |
Integer. The number of folds. |
testSplit |
Numeric. The fraction of samples to be used in making the test set |
A list of numeric vectors of length k, where the elements of each vector are the indices of the samples forming the TEST set for that fold.
## Not run: ## Default testSplit
these_folds <- fitMaxnet::makeFolds(324, 5)
## User-selected testSplit
these_folds <- fitMaxnet::makeFolds(261, 5, 0.3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.