Data frame with an outcome variable and other columns as features.
groups
Vector of groups to keep together when splitting the data into
train and test sets. If the number of groups in the training set is larger
than kfold, the groups will also be kept together for cross-validation.
Length matches the number of rows in the dataset (default: NULL).
kfold
Fold number for k-fold cross-validation (default: 5).