Learn R Programming

proximetricsR (version 0.6.5)

sample_loo: A function to create calibration and validation sample sets for leave-one-out cross-validation

Description

for internal use only! If group is provided, the sampling is done based on the groups.

Usage

sample_loo(N, group = NULL)

Value

a list with two matrices (hold_in and hold_out) giving the indices of the observations in each column. The number of columns represents the number of sampling repetitions.

Arguments

N

the total number of observations.

group

the labels for each sample in y indicating the group each observation belongs to.