| cv_leakage_report | R Documentation |
Generates a detailed report of cross-validation leakage issues.
cv_leakage_report(cv_object, train_idx, test_idx)
cv_object |
A cross-validation object (trainControl, vfold_cv, etc.). |
train_idx |
Integer vector of training indices. |
test_idx |
Integer vector of test indices. |
A list with detailed CV leakage information.
# Using caret trainControl
if (requireNamespace("caret", quietly = TRUE)) {
folds <- list(Fold1 = 1:10, Fold2 = 11:20, Fold3 = 21:25)
ctrl <- caret::trainControl(method = "cv", index = folds)
report <- cv_leakage_report(ctrl, train_idx = 1:25, test_idx = 26:32)
print(report)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.