stratifiedSamplingForCV {coca} | R Documentation |
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
Author(s)
Alessandra Cabassi alessandra.cabassi@mrc-bsu.cam.ac.uk
[Package coca version 1.1.0 Index]