From 0bc0924cc7ef1f08b2c38c9fea3373c47f45f655 Mon Sep 17 00:00:00 2001 From: Adrien Le Guillou Date: Thu, 8 Feb 2024 15:42:55 +0100 Subject: [PATCH] randomize the inital proposal order --- R/proposal.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/proposal.R b/R/proposal.R index 98b16a8..774147b 100644 --- a/R/proposal.R +++ b/R/proposal.R @@ -32,7 +32,10 @@ mutate_default_proposal <- function(calib_object, default_proposal) { make_proposals <- function(calib_object, results) { current_jobs <- get_current_jobs(calib_object, not_done_only = TRUE) if (get_current_iteration(calib_object) == 1) { - proposals <- lapply(current_jobs, function(job) job$initial_proposals) + proposals <- lapply( + current_jobs, + function(job) sample(job$initial_proposals) + ) } else { proposals <- future.apply::future_lapply( current_jobs,