Skip to content

Commit

Permalink
Remove commented out cells
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Apr 1, 2024
1 parent a195a7e commit 6505ffe
Showing 1 changed file with 0 additions and 123 deletions.
123 changes: 0 additions & 123 deletions notebooks/evaluation_2024.03/epi_scenario1/epi_eval_sc1_strains.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,129 +287,6 @@
" json.dump(out_fun(total_tm), f, indent=2)\n",
"total_tm.draw_jupyter(\"sir_3strain.png\")"
]
},
{
"cell_type": "markdown",
"id": "cc5147cc-9830-4b99-b144-0fa42eeaa61c",
"metadata": {},
"source": [
"## Alternative approach (currently abandoned)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "21c873a3-e547-4750-a447-36fbe2aba448",
"metadata": {},
"outputs": [],
"source": [
"# # Do the recovery branches first\n",
"# # FixMe: this only doesn't cover the cross-recovery process e.g. \n",
"# # I_alpha_delta -> R_alpha_delta is covered but I_delta_alpha -> R_alpha_delta isn't.\n",
"# reinf_params = {}\n",
"# recov_init = NaturalConversion(\n",
"# subject=infected,\n",
"# outcome=recovered\n",
"# )\n",
"# recov_init.set_mass_action_rate_law('gamma')\n",
"# reinf_params['gamma'] = Parameter(name='gamma', value=1)\n",
"\n",
"# recov_init_model = TemplateModel(\n",
"# templates=[recov_init],\n",
"# parameters=reinf_params\n",
"# )\n",
"\n",
"# # Stratifiy recovery process by all possible combinations of infection history\n",
"# recovery_model = stratify(\n",
"# template_model=recov_init_model,\n",
"# key='strain',\n",
"# strata=['alpha', 'delta', 'omicron', 'alpha_delta', 'alpha_omicron', 'delta_omicron', 'alpha_delta_omicron'],\n",
"# structure=[]\n",
"# )\n",
"# recovery_model.draw_jupyter('rir_init.png')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a2360ca2-3b10-4101-b0ef-8330f87f9b1e",
"metadata": {},
"outputs": [],
"source": [
"# # Couple the infectious states together with the susceptible states\n",
"# rec_concepts = recovery_model.get_concepts_name_map()\n",
"\n",
"# infected_alpha = rec_concepts['infected_population_alpha']\n",
"# recovered_alpha = rec_concepts['immune_population_alpha']\n",
"\n",
"# = rec_concepts['infected_population_delta']\n",
"# = rec_concepts['immune_population_delta']\n",
"\n",
"# = rec_concepts['infected_population_omicron']\n",
"# = rec_concepts['immune_population_omicron']\n",
"\n",
"# = rec_concepts['infected_population_alpha_delta']\n",
"# = rec_concepts['infected_population_delta_alpha']\n",
"# = rec_concepts['immune_population_alpha_delta']\n",
"\n",
"# = rec_concepts['infected_population_alpha_omicron']\n",
"# = rec_concepts['infected_population_omicron_alpha']\n",
"# = rec_concepts['immune_population_omicron_alpha']\n",
" \n",
"# = rec_concepts['infected_population_delta_omicron']\n",
"# = rec_concepts['infected_population_omicron_delta']\n",
"# = rec_concepts['immune_population_delta_omicron']\n",
"\n",
"# infected_alpha_delta_omicron = rec_concepts['infected_population_alpha_delta_omicron']\n",
"# infected_alpha_omicron_delta = rec_concepts['infected_population_alpha_omicron_delta']\n",
"# infected_delta_omicron_alpha = rec_concepts['infected_population_delta_omicron_alpha']\n",
"# = rec_concepts['immune_population_alpha_delta_omicron']\n",
"\n",
"# alpha_infectors = [infected_alpha, infected_delta_alpha, infected_omicron_alpha, infected_delta_omicron_alpha]\n",
"# alpha_susceptibles = [susceptible, recovered_delta, recovered_omicron, recovered_delta_omicron]\n",
"\n",
"# delta_infectors = [infected_delta, infected_alpha_delta, infected_omicron_delta, infected_alpha_omicron_delta]\n",
"# delta_susceptibles = [susceptible, recovered_alpha, recovered_omicron, recovered_alpha_omicron]\n",
"\n",
"# omicron_infectors = [infected_omicron, infected_alpha_omicron, infected_delta_omicron, infected_alpha_delta_omicron]\n",
"# omicron_susceptibles = [susceptible, recovered_alpha, recovered_delta, recovered_alpha_delta]\n",
"\n",
"# infection_templates = []\n",
"# infection_parameters = {}\n",
"# inf_rate_name = \"beta_{ix}_{inf_name}\"\n",
"# for strain, inf_agents, susceptibles in [\n",
"# ('alpha', alpha_infectors, alpha_susceptibles), \n",
"# ('delta', delta_infectors, delta_susceptibles),\n",
"# ('omicron', omicron_infectors, omicron_susceptibles)\n",
"# ]:\n",
"# # For each each susceptible, create an infection process from all possible infection states\n",
"# for subject, outcome in zip(susceptibles, inf_agents):\n",
"# for ix, infected in enumerate(inf_agents):\n",
"# cc = ControlledConversion(\n",
"# subject=subject,\n",
"# controller=infected,\n",
"# outcome=outcome\n",
"# )\n",
"# param_name = inf_rate_name.format(ix=ix, inf_name=strain)\n",
"# cc.set_mass_action_rate_law(param_name)\n",
"# infection_parameters[param_name] = Parameter(name=param_name, value=1)\n",
"# infection_templates.append(cc)\n",
"\n",
"# infections_model = TemplateModel(templates=infection_templates, parameters=infection_parameters)\n",
"# infections_model.draw_jupyter('infections_model.png')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "d15a1fa0-fe11-41d7-9512-4f922e20ccfc",
"metadata": {},
"outputs": [],
"source": [
"# # Now combine the infectiontion and recovery models\n",
"# alt_model = recovery_model.extend(template_model=infections_model, parameter_mapping=infections_model.parameters)\n",
"# alt_model.draw_jupyter(\"sir_3strain_alt.png\")"
]
}
],
"metadata": {
Expand Down

0 comments on commit 6505ffe

Please sign in to comment.