Repeats .boot_cross_validate() n_repeats times
with different RNG seeds and pools the per-fold scores.
caret::trainControl(method = "repeatedcv") and
rsample::vfold_cv both implement the same partitioning
(cross-referenced).
Arguments
- X
Numeric matrix or data.frame of predictors.
- y
Numeric or factor outcome vector aligned with rows of
X.- model_fn
Function
(X, y) -> fitted-modelused on each training fold.- score_fn
Function
(y_true, y_pred) -> numericreturning a single performance metric.- n_folds
Integer; number of folds per repeat (default 10).
- n_repeats
Number of repetitions.
- seed
Integer RNG seed for reproducibility.