Skip to content

Commit

Permalink
Update interfaces.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
anirban-chaudhuri committed Apr 15, 2024
1 parent d38a554 commit aef588c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/source/interfaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1142,10 +1142,12 @@
}
],
"source": [
"end_time_ensemble = 28.0\n",
"logging_step_size_ensemble = 1.0\n",
"model_paths = [model1, model2]\n",
"solution_mappings = [lambda x : x, lambda x : x] # Conveniently, these two models operate on exactly the same state space, with the same names.\n",
"\n",
"ensemble_result = pyciemss.ensemble_sample(model_paths, solution_mappings, end_time, logging_step_size, num_samples, start_time=start_time)\n",
"ensemble_result = pyciemss.ensemble_sample(model_paths, solution_mappings, end_time_ensemble, logging_step_size_ensemble, num_samples, start_time=start_time, time_unit=\"days\")\n",
"display(ensemble_result['data'].head())\n",
"\n",
"# Plot the ensemble result for cases, hospitalizations, and deaths\n",
Expand Down Expand Up @@ -1553,9 +1555,10 @@
"\n",
"q_ensemble_data = cdc_format(\n",
" ensemble_result[\"ensemble_quantiles\"],\n",
" time_unit=\"days\",\n",
" solution_string_mapping={\n",
" \"infected_state\": \"cases\",\n",
" \"hospitalized_state\": \"hosp.\",\n",
" \"hospitalized_state\": \"hosp\",\n",
" \"dead_state\": \"death\",\n",
" },\n",
" forecast_start_date=\"2023-08-03\",\n",
Expand Down Expand Up @@ -1856,7 +1859,7 @@
}
],
"source": [
"calibrated_ensemble_result = pyciemss.ensemble_sample(model_paths, solution_mappings, end_time, logging_step_size, num_samples, \n",
"calibrated_ensemble_result = pyciemss.ensemble_sample(model_paths, solution_mappings, end_time_ensemble, logging_step_size_ensemble, num_samples, \n",
" start_time=start_time, inferred_parameters=parameter_estimates)\n",
"display(calibrated_ensemble_result['data'].head())\n",
"\n",
Expand Down

0 comments on commit aef588c

Please sign in to comment.