resampling: create (repeated) cross validation folds

Description Usage Arguments Value

Description

create (repeated) cross validation folds

Usage

1
2
3
4
5
createCVFolds(x, y, nfold = 5, repeats = 1, stratify = FALSE,
  seed = NULL)

createBootstrap(x, y, n, repeats = 25, replace = TRUE, stratify = FALSE,
  seed = NULL)

Arguments

x

Design matrix

y

Response vector

nfold

Number of folds

repeats

Number of repeats

stratify

Should folds be stratified on response classes or censoring indicators (if survival)

seed

Seed to set before sampling

n

Bootstrapped sample size (if integer) or proportional

replace

If to sample with replacement

Value

A list of repeated cross validation training samples (as row numbers of x) or a list of Bootstrap samples (as row numbers of x as well).


linxihui/lazyML documentation built on May 21, 2019, 6:39 a.m.