getDownSampleInd {folda} | R Documentation |
Helper Function to Generate Training Set Indices Through Downsampling
Description
This function selects the indices for the training set based on the class
vector response
. It allows for optional downsampling to balance the class
distribution by limiting the number of samples per class.
Usage
getDownSampleInd(response, downSampling = FALSE, kSample = NULL)
Arguments
response |
A factor vector representing the class labels. |
downSampling |
A logical value indicating whether downsampling should be
applied. If |
kSample |
An integer specifying the maximum number of samples to be
selected per class. If |
Value
An integer vector of indices representing the selected samples from
the original response
vector.