K-fold Cross-Validation Data Preparation
crossv_k.Rd
This function prepares the data for k-fold cross-validation by dividing the dataset into k folds. It creates subsets of training and testing data for each fold without performing any analysis or fitting models.
Arguments
- data
A data frame containing the training data.
- y
A response vector.
- k
An integer specifying the number of folds for cross-validation.
- id
A character string specifying the identifier for the output data frame.