partition_data: Partition data into (random) folds for cross-validation.

Description Usage Arguments Value

View source: R/utility_funcs.r

Description

Partition data into (random) folds for cross-validation.

Usage

1
partition_data(n, k, random = FALSE)

Arguments

n

number of rows

k

number of folds

random

flag to choose whether to randomly select

Value

ind vector of integers denoting the OOS fold each row belongs to Returns vector of indices denoting the OOS index, i_e. for rows with I_i=1, those are OOS for i=1


ant-stephenson/lhc documentation built on Jan. 28, 2021, 3:47 p.m.