rsplit: Generate Samples of Splits Possibilities

Description Usage Arguments Value Author(s) Examples

View source: R/sample_splits.R

Description

rsplit returns a matrix with random splits of the variables in groups.

Usage

1
rsplit(n, p, G, use.all = TRUE, fix.partition = NULL, verbose = TRUE)

Arguments

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).

Value

A matrix or list with the number of possible objects in each group using splits.

Author(s)

Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca

Examples

1
2
3
4
5
# 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))

splitSelect documentation built on Nov. 9, 2021, 9:07 a.m.