コード例 #1
0
    )
    print("Finished simulating!")

from src.analysis.helpers import *

logK, logK_sigma, beta, covid_index_offset, _ = load_covid_index(start_date)

fraction, fraction_sigma, fraction_offset, _ = load_b117_fraction()

for subset in [{"contact_matrices_name": "2021_fase1"}]:

    print(subset)

    # Load the ABM simulations
    abm_files = file_loaders.ABM_simulations(base_dir="Output/ABM",
                                             subset=subset,
                                             verbose=True)

    lls_f = []
    lls_s = []

    for cfg in tqdm(abm_files.iter_cfgs(),
                    desc="Calculating log-likelihoods",
                    total=len(abm_files.cfgs)):

        ll_f = []
        ll_s = []

        for filename in abm_files.cfg_to_filenames(cfg):

            # Load
コード例 #2
0
        # axes[1].plot([1,100],[RS[1],RS[1]])
        i += 1
        #axes[1].legend()
    

    return fig, axes, fi_list, pc_list,name_list


rc_params.set_rc_params()

#%%

reload(plot)
reload(file_loaders)

abm_files = file_loaders.ABM_simulations(verbose=True)
network_files = file_loaders.ABM_simulations(base_dir="Data/network", filetype="hdf5")
pdf_name = Path(f"Figures/data_anal.pdf")
utils.make_sure_folder_exist(pdf_name)
with PdfPages(pdf_name) as pdf:
        fi_list = []
        pc_list = []
        name_list = []
        # for ABM_parameter in tqdm(abm_files.keys, desc="Plotting individual ABM parameters"):
        for cfg in tqdm(
            abm_files.iter_cfgs(),
            desc="Plotting individual ABM parameters",
            total=len(abm_files.cfgs),
        ):

            # break