Learn R Programming

coca (version 1.1.0)

stratifiedSamplingForCV: Divide data into 5 subsets using stratified sampling

Description

This function is used to do stratified subsampling based on the number of observations in each group in the response

Usage

stratifiedSamplingForCV(response)

Arguments

response

Vector of categorical responses

Value

The function returns a vector of labels to assign each observation to a different fold