Ejemplo n.º 1
0
from apps.covid_19 import calibration as base
from apps.covid_19.calibration import (
    add_standard_dispersion_parameter,
    add_standard_philippines_params,
    add_standard_philippines_targets,
    provide_default_calibration_params,
)
from autumn.region import Region
from autumn.utils.params import load_targets

targets = load_targets("covid_19", Region.PHILIPPINES)
TARGET_OUTPUTS = add_standard_philippines_targets(targets)
PAR_PRIORS = provide_default_calibration_params()
PAR_PRIORS = add_standard_philippines_params(PAR_PRIORS, Region.PHILIPPINES)
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "icu_occupancy")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "accum_deaths")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "notifications")


def run_calibration_chain(max_seconds: int, run_id: int, num_chains: int):
    base.run_calibration_chain(
        max_seconds,
        run_id,
        num_chains,
        Region.PHILIPPINES,
        PAR_PRIORS,
        TARGET_OUTPUTS,
        mode="autumn_mcmc",
Ejemplo n.º 2
0
from apps.covid_19 import calibration as base
from apps.covid_19.calibration import (
    add_standard_dispersion_parameter,
    add_standard_philippines_params,
    add_standard_philippines_targets,
    provide_default_calibration_params,
)
from autumn.region import Region
from autumn.utils.params import load_targets

targets = load_targets("covid_19", Region.DAVAO_CITY)
TARGET_OUTPUTS = add_standard_philippines_targets(targets)
PAR_PRIORS = provide_default_calibration_params()
PAR_PRIORS = add_standard_philippines_params(PAR_PRIORS, Region.DAVAO_CITY)
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "icu_occupancy")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "accum_deaths")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "notifications")


def run_calibration_chain(max_seconds: int, run_id: int, num_chains: int):
    base.run_calibration_chain(
        max_seconds,
        run_id,
        num_chains,
        Region.DAVAO_CITY,
        PAR_PRIORS,
        TARGET_OUTPUTS,
        mode="autumn_mcmc",
Ejemplo n.º 3
0
from apps.covid_19 import calibration as base
from apps.covid_19.calibration import (
    add_standard_dispersion_parameter,
    add_standard_philippines_params,
    add_standard_philippines_targets,
    provide_default_calibration_params,
)
from autumn.region import Region
from autumn.utils.params import load_targets

targets = load_targets("covid_19", Region.MANILA)
TARGET_OUTPUTS = add_standard_philippines_targets(targets)
PAR_PRIORS = provide_default_calibration_params()
PAR_PRIORS = add_standard_philippines_params(PAR_PRIORS, Region.MANILA)
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "icu_occupancy")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "accum_deaths")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "notifications")


def run_calibration_chain(max_seconds: int, run_id: int, num_chains: int):
    base.run_calibration_chain(
        max_seconds,
        run_id,
        num_chains,
        Region.MANILA,
        PAR_PRIORS,
        TARGET_OUTPUTS,
        mode="autumn_mcmc",
Ejemplo n.º 4
0
from apps.covid_19 import calibration as base
from apps.covid_19.calibration import (
    add_standard_dispersion_parameter,
    add_standard_philippines_params,
    add_standard_philippines_targets,
    provide_default_calibration_params,
)
from autumn.region import Region
from autumn.utils.params import load_targets

targets = load_targets("covid_19", Region.CENTRAL_VISAYAS)
TARGET_OUTPUTS = add_standard_philippines_targets(targets)
PAR_PRIORS = provide_default_calibration_params()
PAR_PRIORS = add_standard_philippines_params(PAR_PRIORS,
                                             Region.CENTRAL_VISAYAS)
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "icu_occupancy")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "accum_deaths")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS,
                                               "notifications")


def run_calibration_chain(max_seconds: int, run_id: int, num_chains: int):
    base.run_calibration_chain(
        max_seconds,
        run_id,
        num_chains,
        Region.CENTRAL_VISAYAS,
        PAR_PRIORS,
        TARGET_OUTPUTS,
Ejemplo n.º 5
0
from apps.covid_19 import calibration as base
from apps.covid_19.calibration import (
    add_standard_dispersion_parameter,
    add_standard_philippines_params,
    add_standard_philippines_targets,
    provide_default_calibration_params,
)
from autumn.region import Region
from autumn.utils.params import load_targets

targets = load_targets("covid_19", Region.CALABARZON)
TARGET_OUTPUTS = add_standard_philippines_targets(targets)
PAR_PRIORS = provide_default_calibration_params()
PAR_PRIORS = add_standard_philippines_params(PAR_PRIORS, Region.CALABARZON)
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS, "icu_occupancy")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS, "accum_deaths")
PAR_PRIORS = add_standard_dispersion_parameter(PAR_PRIORS, TARGET_OUTPUTS, "notifications")


def run_calibration_chain(max_seconds: int, run_id: int, num_chains: int):
    base.run_calibration_chain(
        max_seconds,
        run_id,
        num_chains,
        Region.CALABARZON,
        PAR_PRIORS,
        TARGET_OUTPUTS,
        mode="autumn_mcmc",
        adaptive_proposal=True,
    )