From 94b832b17f104bc16e8056907dc82c37f054582a Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:06:52 +0200 Subject: [PATCH 1/6] update env --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index d3f130385..7308b6248 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge - defaults dependencies: - - python=3.11.4 + - python=3.12 - pandas - numpy - scipy From c07d7fc6909c4c29556914f57642ef3c5df91720 Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:29:37 +0200 Subject: [PATCH 2/6] trim dependencies --- setup.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index a0623b6da..b3268ff5f 100644 --- a/setup.py +++ b/setup.py @@ -13,15 +13,9 @@ 'numpy', 'scipy', 'pandas', - 'xlrd', - 'openpyxl', - 'zarr', - 'emcee', - 'xarray', - 'rbfopt', + 'openpyxl', 'numba', - 'SAlib', - 'h5py' + 'pySODM', ], extras_require={ "develop": ["pytest", From 5884450cee12cd769a75892545e963e6eb6ab88b Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:29:53 +0200 Subject: [PATCH 3/6] remove warning suppression in spatial model --- .../calibrate_BASE-COVID19_SEIQRD_spatial_hybrid_vacc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_spatial_hybrid_vacc.py b/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_spatial_hybrid_vacc.py index 4b7d3e84e..4d2264b1d 100644 --- a/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_spatial_hybrid_vacc.py +++ b/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_spatial_hybrid_vacc.py @@ -32,8 +32,6 @@ from pySODM.optimization.mcmc import perturbate_theta, run_EnsembleSampler, emcee_sampler_to_dictionary from pySODM.optimization.objective_functions import log_posterior_probability, log_prior_uniform, ll_poisson, ll_negative_binomial -import warnings -warnings.filterwarnings("ignore") #################################### ## Public or private spatial data ## @@ -237,7 +235,7 @@ # Join them together pars = pars1 + pars2 + pars3 + pars4 bounds = bounds1 + bounds2 + bounds3 + bounds4 - labels = ['$\\Omega$', '$\Psi$', '$k$', '$\Psi_{F}$', '$\Psi_{W}$', '$\Psi_{B}$', '$K_{inf, abc}$', '$K_{inf,\\delta}$', '$A$', '$f_h$'] + labels = [r'$\Omega$', r'$\Psi$', '$k$', r'$\Psi_{F}$', r'$\Psi_{W}$', r'$\Psi_{B}$', r'$K_{inf, abc}$', r'$K_{inf,\delta}$', '$A$', '$f_h$'] # Setup objective function with uniform priors objective_function = log_posterior_probability(model,pars,bounds,data,states,log_likelihood_fnc,log_likelihood_fnc_args,labels=labels, aggregation_function=aggregate_Brussels_Brabant_DataArray) From d0e15a37f03ceff90c2d2dbb65d98f2bf4b6207b Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:30:39 +0200 Subject: [PATCH 4/6] chained assignment warning in VOC parameters --- src/covid19_DTM/data/model_parameters.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/covid19_DTM/data/model_parameters.py b/src/covid19_DTM/data/model_parameters.py index ec844bc11..6cbbce428 100644 --- a/src/covid19_DTM/data/model_parameters.py +++ b/src/covid19_DTM/data/model_parameters.py @@ -464,13 +464,13 @@ def get_COVID19_SEIQRD_VOC_parameters(VOCs=['WT', 'abc', 'delta', 'omicron'], pa index=['WT', 'abc', 'delta', 'omicron'], columns=pd.MultiIndex.from_tuples(columns)) # Define logistic growth properties - VOC_parameters.loc['WT']['logistic_growth'] = [ + VOC_parameters.loc['WT', 'logistic_growth'] = [ datetime(2019, 1, 1), datetime(2019, 2, 1), 0.20] - VOC_parameters.loc['abc']['logistic_growth'] = [ + VOC_parameters.loc['abc', 'logistic_growth'] = [ datetime(2020, 12, 1), datetime(2021, 2, 14), 0.07] - VOC_parameters.loc['delta']['logistic_growth'] = [ + VOC_parameters.loc['delta', 'logistic_growth'] = [ datetime(2021, 5, 1), datetime(2021, 6, 25), 0.11] - VOC_parameters.loc['omicron']['logistic_growth'] = [ + VOC_parameters.loc['omicron', 'logistic_growth'] = [ datetime(2021, 11, 26), datetime(2021, 12, 24), 0.19] # Define variant properties From 5f02fae847779b04bcda2df2395f5a6e7002d82a Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:30:52 +0200 Subject: [PATCH 5/6] unsuppress warnings in national model calibration --- .../calibrate_BASE-COVID19_SEIQRD_hybrid_vacc.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_hybrid_vacc.py b/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_hybrid_vacc.py index 4ff3bdc52..7f7ecdeaf 100644 --- a/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_hybrid_vacc.py +++ b/notebooks/calibration/calibrate_BASE-COVID19_SEIQRD_hybrid_vacc.py @@ -35,10 +35,6 @@ from pySODM.optimization.mcmc import perturbate_theta, run_EnsembleSampler, emcee_sampler_to_dictionary from pySODM.optimization.objective_functions import log_posterior_probability, log_prior_uniform, ll_negative_binomial, ll_poisson -# Suppress warnings -import warnings -warnings.filterwarnings("ignore") - ############################# ## Handle script arguments ## ############################# @@ -192,7 +188,7 @@ pars = pars1 + pars2 + pars3 + pars4 bounds = bounds1 + bounds2 + bounds3 + bounds4 # Define labels - labels = ['$\Omega$', '$\Psi$', 'k', '$K_{inf, abc}$', '$K_{inf, \\delta}$', '$A$', '$f_h$'] + labels = [r'$\Omega$', r'$\Psi$', r'k', r'$K_{inf, abc}$', r'$K_{inf, \delta}$', r'$A$', r'$f_h$'] # Setup objective function without priors and with negative weights objective_function = log_posterior_probability(model,pars,bounds,data,states,log_likelihood_fnc,log_likelihood_fnc_args,labels=labels) From b53f23626031dabd0248cb1089abbbea08a68947 Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 15:31:00 +0200 Subject: [PATCH 6/6] update vaccination incidences --- .../sciensano/vacc_incidence_national.pkl | Bin 438008 -> 438008 bytes .../interim/sciensano/vacc_incidence_prov.pkl | Bin 3894823 -> 3894829 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/data/covid19_DTM/interim/sciensano/vacc_incidence_national.pkl b/data/covid19_DTM/interim/sciensano/vacc_incidence_national.pkl index 08a3219770066839119c3d0250be415c7cdea6f2..fd6eaabeb681bf15853aed5cb2f4a1b55e30e7c0 100644 GIT binary patch delta 43 scmexySL(-IsSPt2S>)M1vNX?OY@fpj!c0KS48$xz%({IJBU{W`0DY7Xi~s-t delta 43 scmexySL(-IsSPt2S$4#P@;1+5Y@fpj!c0KS48$xz%({IJBU{W`0E#yc=l}o! diff --git a/data/covid19_DTM/interim/sciensano/vacc_incidence_prov.pkl b/data/covid19_DTM/interim/sciensano/vacc_incidence_prov.pkl index 091b0ec78d5d5ee1653e0203ff8545db420172b6..9a8ed5c4e7e7c9dab90ed358cbf7557b17d15f4d 100644 GIT binary patch delta 295 zcmWl|xlY1x0Knn=p@kN&a(RJrUjmhiirBGs=+ajpkT{XD`2-9u9h;P)yORk_zKkOq zad2?=$CrE`-#_A$>y?m7iC<|MiT6nC#~7zXnF%JTP-Th-Jme9Nc|wh8W|(D;d7ko& z=e*!03oP=A*DSHj3ahNK&IX%ovCR%|*kzA>>b&KE2JblJJs_?+ZiUmtPd z?JQK!#oWA;#a