Exemplo n.º 1
0
def _run_SEIR_BAYES_model(N,
                          E0,
                          I0,
                          R0,
                          R0__params: 'repr. rate mean and std',
                          gamma_inv_params: 'removal rate mean and std',
                          alpha_inv_params: 'incubation rate mean and std',
                          t_max,
                          runs,
                          interactive=True,
                          scale='log',
                          show_uncertainty=True):
    S, E, I, R, t_space = run_SEIR_BAYES_model(N, E0, I0, R0, R0__params,
                                               gamma_inv_params,
                                               alpha_inv_params, t_max, runs)

    if interactive:
        return seir_bayes_interactive_plot(N,
                                           E0,
                                           I0,
                                           R0,
                                           t_max,
                                           runs,
                                           S,
                                           E,
                                           I,
                                           R,
                                           t_space,
                                           scale=scale,
                                           show_uncertainty=show_uncertainty)

    return seir_bayes_plot(N, E0, I0, R0, R0__params, gamma_inv_params,
                           alpha_inv_params, t_max, runs, S, E, I, R, t_space)
Exemplo n.º 2
0
def _run_SEIR_BAYES_model(N, E0, I0, R0, R0__loc, R0__scale, gamma_loc,
                          gamma_scale, alpha_loc, alpha_scale, t_max, runs):
    S, E, I, R, t_space = st.cache(run_SEIR_BAYES_model)(
        N, E0, I0, R0, R0__loc, R0__scale, gamma_loc, gamma_scale, alpha_loc,
        alpha_scale, t_max, runs)
    fig = seir_bayes_plot(N, E0, I0, R0, R0__loc, R0__scale, gamma_loc,
                          gamma_scale, alpha_loc, alpha_scale, t_max, runs, S,
                          E, I, R, t_space)
    return fig