samplesSplits | R Documentation |
samplesSplits
Creates two lists of lists. First has training samples, second has test samples for a range
of different cross-validation schemes.
splitsTestInfo
creates a table for tracking the permutation, fold number, or subset of each set
of test samples. Useful for column-binding to the predictions, once they are unlisted into a vector.
samplesSplits(
samplesSplits = c("k-Fold", "Permute k-Fold", "Permute Percentage Split",
"Leave-k-Out"),
permutations = 100,
folds = 5,
percentTest = 25,
leave = 2,
outcome
)
splitsTestInfo(
samplesSplits = c("k-Fold", "Permute k-Fold", "Permute Percentage Split",
"Leave-k-Out"),
permutations = 100,
folds = 5,
percentTest = 25,
leave = 2,
splitsList
)
samplesSplits |
Default: |
permutations |
Default: |
folds |
Default: |
percentTest |
Default: |
leave |
Default: |
outcome |
A |
splitsList |
The return value of the function |
For samplesSplits
, two lists of the same length. First is training partitions. Second is test partitions.
For splitsTestInfoTable
, a table with a subset of columns "permutation"
, "fold"
and "subset"
, depending on the cross-validation scheme specified.
classes <- factor(rep(c('A', 'B'), c(15, 5)))
splitsList <-samplesSplits(permutations = 1, outcome = classes)
splitsList
splitsTestInfo(permutations = 1, splitsList = splitsList)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.