bucky.model.parameters

Submodule to handle the model parameterization and randomization

Module Contents

Classes

buckyParams

Class holding all the model parameters defined in the par file, also used to reroll them for each MC run

Functions

CI_to_std(CI)

Convert a 95% confidence interval to an equivilent stddev (assuming its normal)

calc_Reff(m, n, Tg, Te, r)

Calculate the effective reproductive number

calc_Te(Tg, Ts, n, f)

Calculate the latent period

calc_Ti(Te, Tg, n)

Calcuate the infectious period

calc_beta(Te)

Derive beta from Te

calc_gamma(Ti)

Derive gamma from Ti

recursive_dict_update(d, u)

class bucky.model.parameters.buckyParams(par_file=None)[source]

Class holding all the model parameters defined in the par file, also used to reroll them for each MC run

_generate_param_funcs(self, base_params)[source]
_update_params(self, update_dict)[source]
static age_interp(x_bins_new, x_bins, y)[source]

Interpolate parameters define in age groups to a new set of age groups

calc_derived_params(self, params)[source]

Add the derived params that are calculated from the rerolled ones

generate_params(self)[source]

Generate a new set of params by rerolling, adding the derived params and rejecting invalid sets

static read_yml(par_file)[source]

Read in the YAML par file

reroll_params(self)[source]

Sample each parameter from distribution and calculate derived parameters.

update_params(self, par_file)[source]

Update parameter distributions, consts, and dists from new yaml file.

bucky.model.parameters.CI_to_std(CI)[source]

Convert a 95% confidence interval to an equivilent stddev (assuming its normal)

bucky.model.parameters.calc_Reff(m, n, Tg, Te, r)[source]

Calculate the effective reproductive number

bucky.model.parameters.calc_Te(Tg, Ts, n, f)[source]

Calculate the latent period

bucky.model.parameters.calc_Ti(Te, Tg, n)[source]

Calcuate the infectious period

bucky.model.parameters.calc_beta(Te)[source]

Derive beta from Te

bucky.model.parameters.calc_gamma(Ti)[source]

Derive gamma from Ti

bucky.model.parameters.recursive_dict_update(d, u)[source]