Fix incorrect time and add recursive dir creation
This commit is contained in:
parent
3aac79d151
commit
eb1a4e69ac
1 changed files with 2 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ results_dir <- here("results", "increasing_size")
|
||||||
save_path <- here(results_dir, paste0("sbm_incr_", model, "_from_", min_nb_col, "_to_", max_nb_col, ".Rds"))
|
save_path <- here(results_dir, paste0("sbm_incr_", model, "_from_", min_nb_col, "_to_", max_nb_col, ".Rds"))
|
||||||
|
|
||||||
if (!dir.exists(results_dir)) {
|
if (!dir.exists(results_dir)) {
|
||||||
dir.create(results_dir)
|
dir.create(results_dir, recursive = TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
print(paste0("Final results will be saved to ", save_path))
|
print(paste0("Final results will be saved to ", save_path))
|
||||||
|
|
@ -92,7 +92,7 @@ lbm_res <- future_lapply(seq_along(lbm_matrices), function(mat_idx) {
|
||||||
start_time <- Sys.time()
|
start_time <- Sys.time()
|
||||||
fit <- estimateBipartiteSBM(netMat = lbm_matrices[[mat_idx]], estimOptions = list(plot = 0))
|
fit <- estimateBipartiteSBM(netMat = lbm_matrices[[mat_idx]], estimOptions = list(plot = 0))
|
||||||
stop_time <- Sys.time()
|
stop_time <- Sys.time()
|
||||||
out_list <- list(fit = fit, time = time)
|
out_list <- list(fit = fit, time = stop_time - start_time)
|
||||||
return(out_list)
|
return(out_list)
|
||||||
}, future.seed = TRUE)
|
}, future.seed = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue