kfold | R Documentation |
Determine k-fold partitions for a given number of samples
kfold(n, k = NULL)
n |
number of samples |
k |
number of partitions (Defaults to n; i.e. "leave-one-out") |
For specific use in cross validation (see cv.nperm
)
a list containing sample numbers in each partition
res <- kfold(100,6) res length(res) # partition indices unlist(lapply(res, length)) # number of samples in each partition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.