c-rutter / crcrdm

Robust Decision Making Tools for Cancer Screening Models
https://c-rutter.github.io/crcrdm/
GNU General Public License v2.0
3 stars 0 forks source link

Randomize and prioritize order of runs to allow early comparisons when running experiments in parallel #17

Closed pedroliman closed 2 years ago

pedroliman commented 2 years ago

LIke in our COVID-19 work, runs should be ordered to allow for comparisons across scenarios as soon as possible.

This is how we did it in the covid-19 work:

sow_experiments = unique(experiment_model_rdm$future_experimental_design %>% select(RunID, LHSExperimentID))

  # Randomizing the order of the sow_experiments:
  sow_experiments = sow_experiments[sample(nrow(sow_experiments), replace = F),]

  # adding the grid experiment ids:

  GridExperimentID = unique(experiment_model_rdm$future_experimental_design$GridExperimentID)

  experiments_order = tidyr::expand_grid(sow_experiments, GridExperimentID)

  future_experimental_design = experiments_order %>%
    dplyr::left_join(experiment_model_rdm$future_experimental_design, by = c("RunID", "LHSExperimentID", "GridExperimentID")) %>%
    mutate(ExperimentID = row_number())

  experiment_model_rdm$future_experimental_design = future_experimental_design
pedroliman commented 2 years ago

This is no longer required given how the experimental design is created. The experimental design is already created in an order that will allow early comparisons between policies.