Skip to content

Commit

Permalink
Merge pull request #241 from HopkinsIDD/fix-sample-configs
Browse files Browse the repository at this point in the history
Some small fixes to errors in aggregation stuff
  • Loading branch information
jcblemai committed Jun 25, 2024
2 parents 9e0ad95 + bb207a2 commit 530afbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ seir:

seir_modifiers:
scenarios:
- Ro_all
- inference
modifiers:
Ro_mod: # assume same for all subpopulations
method: SinglePeriodModifier
Expand Down Expand Up @@ -86,7 +86,7 @@ seir_modifiers:
sd: 0.025
a: -0.1
b: 0.1
Ro_all:
inference:
method: StackedModifier
modifiers: ["Ro_mod","Ro_lockdown"]

Expand Down Expand Up @@ -122,10 +122,10 @@ outcomes:

outcome_modifiers:
scenarios:
- test_limits
- all
modifiers:
# assume that due to limitations in testing, initially the case detection probability was lower
test_limits:
all:
method: SinglePeriodModifier
parameter: incidCase
subpop: "all"
Expand Down
7 changes: 4 additions & 3 deletions flepimop/main_scripts/inference_slot.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ if (opt$config == ""){
}
config = flepicommon::load_config(opt$config)

opt$total_ll_multiplier <- 1
if (!is.null(config$inference$incl_aggr_likelihood)){
print("Using config option for `incl_aggr_likelihood`.")
opt$incl_aggr_likelihood <- config$inference$incl_aggr_likelihood
Expand Down Expand Up @@ -450,7 +451,7 @@ for(seir_modifiers_scenario in seir_modifiers_scenarios) {
autowrite_seir = TRUE
)
}, error = function(e) {
print("GempyorInference failed to run (call on l. 405 of inference_slot.R).")
print("GempyorInference failed to run (call on l. 443 of inference_slot.R).")
print("Here is all the debug information I could find:")
for(m in reticulate::py_last_error()) print(m)
stop("GempyorInference failed to run... stopping")
Expand Down Expand Up @@ -637,8 +638,8 @@ for(seir_modifiers_scenario in seir_modifiers_scenarios) {
sim_hosp <- sim_hosp %>%
dplyr::bind_rows(
sim_hosp %>%
dplyr::select(-tidyselect::all_of(obs_subpop), -tidyselect::starts_with("date")) %>%
dplyr::group_by(time) %>%
dplyr::select(-tidyselect::all_of(obs_subpop)) %>%
dplyr::group_by(date) %>%
dplyr::summarise(dplyr::across(tidyselect::everything(), sum)) %>% # no likelihood is calculated for time periods with missing data for any subpop
dplyr::mutate(!!obs_subpop := "Total")
)
Expand Down

0 comments on commit 530afbc

Please sign in to comment.