Skip to content

Commit 84cbf0c

Browse files
committed
Read .rds outputs from custom folds
1 parent 82f6119 commit 84cbf0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/machine_learning.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,17 +430,17 @@ compute_k_fold_CV = function(model, k_folds, n_rep, stacking = FALSE, metric = "
430430
}
431431

432432
### Extract the file names of the folds
433-
#result_files <- list.files("Results", pattern = "^fold_.*\\.rds$", full.names = TRUE)
434-
#fold_data = vector("list", length(result_files))
433+
result_files <- list.files("Results", pattern = "^fold_.*\\.rds$", full.names = TRUE)
434+
fold_data = vector("list", length(result_files))
435435

436436
# Initialize master list to store everything in memory
437437
models_all_folds <- vector("list", length(result_files))
438438

439439
# Iterate across folds and inside each subfold corresponding to each param combination (if exist)
440440
for (fold_i in seq_along(result_files)) { ### number of folds (k_fold x n_rep)
441441

442-
#result = readRDS(result_files[[fold_i]])
443-
result = result_files[[fold_i]]
442+
result = readRDS(result_files[[fold_i]])
443+
#result = result_files[[fold_i]]
444444

445445
# Each fold contains multiple parameter sets (list of lists) --> fold_construction_args_tunable != NULL
446446
if (!is.null(fold_construction_args_tunable)) {

0 commit comments

Comments
 (0)