<jupyter_start><jupyter_text>Get matrices<jupyter_code>variant = 'delta'
matrices = vc.covid.get_covid_matrices(variant=variant)
matrices
M, V = matrices['S'].shape
base_R0 = 10.
K = vc.covid.get_next_generation_matrix_covid(base_R0,variant=variant)
C = vc.covid.get_contribution_matrix_covid(base_R0,variant=variant)
to_jup(convert_4d_matrix_to_2d_block(C),prefix='C=',
       separate_rows=np.arange(1,M)*V,
       separate_columns=np.arange(1,M)*V,
      )

C_red = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(base_R0,variant=variant)
to_jup(C_red,prefix='C^{SV}=')
R_eff = (C_red.sum(axis=0))
to_jup(R_eff,prefix='R^{SV}=',is_row_vector=False)
R0 = [1.] + 4*[base_R0]
C_red_lk = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(R0,variant=variant)
to_jup(C_red_lk,prefix='C^{SV}=')
R_eff_lk = (C_red_lk.sum(axis=0))
to_jup(R_eff_lk,prefix='R^{SV}=',is_row_vector=False)
R0 = [0.] + 4*[base_R0]
C_red_lk100 = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(R0,variant=variant)
to_jup(C_red_lk100,prefix='C^{SV}=')
R_eff_lk100 = (C_red_lk100.sum(axis=0))
to_jup(R_eff_lk100,prefix='R^{SV}=',is_row_vector=False)
variant = 'alpha'
matrices = vc.covid.get_covid_matrices(variant=variant)
matrices
M, V = matrices['S'].shape
base_R0 = 4.
K = vc.covid.get_next_generation_matrix_covid(base_R0,variant=variant)
C = vc.covid.get_contribution_matrix_covid(base_R0,variant=variant)
to_jup(convert_4d_matrix_to_2d_block(C),prefix='C=',
       separate_rows=np.arange(1,M)*V,
       separate_columns=np.arange(1,M)*V,
      )
C_red = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(base_R0,variant=variant)
to_jup(C_red,prefix='C^{SV}=')
R_eff = (C_red.sum(axis=0))
to_jup(R_eff,prefix='R^{SV}=',is_row_vector=False)
R0 = [1.] + 4*[base_R0]
C_red_lk = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(R0,variant=variant)
to_jup(C_red_lk,prefix='C^{SV}=')
R_eff_lk = (C_red_lk.sum(axis=0))
to_jup(R_eff_lk,prefix='R^{SV}=',is_row_vector=False)
R0 = [0.] + 4*[base_R0]
C_red_lk100 = vc.covid.get_reduced_vaccinated_susceptible_contribution_matrix_covid(R0,variant=variant)
to_jup(C_red_lk100,prefix='C^{SV}=')
R_eff_lk100 = (C_red_lk100.sum(axis=0))
to_jup(R_eff_lk100,prefix='R^{SV}=',is_row_vector=False)
v, s, r = vc.io.get_homogeneous_vaccination_parameters(variant=variant)
R0 = base_R0
C_hom = vc.get_homogeneous_contribution_matrix(R0, v, s, r)
to_jup(C_hom,prefix=r'C^{SV}_\mathrm{hom}=')
R_eff_hom = (C_hom.sum(axis=0))
to_jup(R_eff_hom,prefix=r'R^{SV}_\mathrm{hom}=',is_row_vector=False)
R0 = [1, base_R0]
C_hom = vc.get_homogeneous_contribution_matrix(R0, v, s, r)
to_jup(C_hom,prefix=r'C^{SV}_\mathrm{hom}=')
R_eff_hom = (C_hom.sum(axis=0))
to_jup(R_eff_hom,prefix=r'R^{SV}_\mathrm{hom}=',is_row_vector=False)
R0 = [0, base_R0]
C_hom = vc.get_homogeneous_contribution_matrix(R0, v, s, r)
to_jup(C_hom,prefix=r'C^{SV}_\mathrm{hom}=')
R_eff_hom = (C_hom.sum(axis=0))
to_jup(R_eff_hom,prefix=r'R^{SV}_\mathrm{hom}=',is_row_vector=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1667208319792005, 'fraction_numerical': 0.028924276893077673, 'mean_word_length': 10.70342205323194, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '398312', 'license': 'MIT', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1423, 'n_words': 122, 'path': 'cookbook/notebooks/covid_examples.ipynb', 'repo_name': 'benmaier/vaccontrib', 'size': '3077'}