View source: R/utility_functions.R
subsampling | R Documentation |
Creates subsamples via cross-validation folds or bootstrapping.
subsampling(..., subsampling_strategy = "cv")
cv_fold(
dat_list,
nfolds = 5,
nruns = 2,
stratified_cv = FALSE,
anti_stratified = FALSE,
cv_stratification_var = NULL,
extra_fold = TRUE,
...
)
bootstrap(dat_list, nruns = 100, ...)
... |
extra arguments are ignored |
subsampling_strategy |
either |
dat_list |
list of datasets, each either data.table or data.frame (samples x features) with an "id" column or expression matrix (genes x samples) with named columns |
nfolds |
number of cross-validation folds |
nruns |
number of cross-validation replicates |
stratified_cv |
if |
anti_stratified |
if |
cv_stratification_var |
labels used for stratification |
extra_fold |
if |
list of data.frames with added columns "fold", "run" and "cv_index" as well as duplicated rows of the original data corresponding to different folds.
list of data.frame
s with added columns "fold", "run" and "cv_index" as well as
duplicated rows of the original data corresponding to different folds.
list of data.frame
s
cv_fold()
: Cross-validation based subsampling
bootstrap()
: Subsampling via bootstrapping.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.