rsplit {splitSelect} | R Documentation |
rsplit
returns a matrix with random splits of the variables in groups.
rsplit(n, p, G, use.all = TRUE, fix.partition = NULL, verbose = TRUE)
n |
Number of sample splits. |
p |
Number of variables or objects to split. |
G |
Number of groups into which the variables are split. |
use.all |
Boolean variable to determine if all variables must be used (default is TRUE). |
fix.partition |
Optional matrix with G columns indicating the partitions (in each row) to be considered for the splits. |
verbose |
Boolean variable to determine if console output for cross-validation progress is printed (default is TRUE). |
A matrix or list with the number of possible objects in each group using splits.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Generating sample splits of 6 variables in 3 groups
# Using all the variables
random.splits <- rsplit(100, 6, 3)
# Using fixed partitions
random.splits.fixed <- rsplit(100, 6, 3, fix.partition=matrix(c(2,2,2), nrow=1))