Skip to content

About

Minimal chap simulation model: autoregressive Poisson disease cases driven by lagged rainfall and temperature, for chap simulate

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

climate_simulation_model

A minimal simulation model for chap. It takes covariates for a set of locations and periods and simulates disease_cases for them. It is meant for generating synthetic datasets with a known data-generating process, not for forecasting: the train and predict entry points raise NotImplementedError.

Model

For each location, cases in period t are Poisson with

log(rate_t) = intercept
            + location_effect
            + rainfall_effect        * rainfall_{t-1} / 150
            + temperature_effect     * (mean_temperature_t - 25) / 3
            + autoregressive_effect  * (log(1 + cases_{t-1}) - intercept)

where location_effect ~ Normal(0, location_sd). All parameters are user_options in MLproject and can be set with user_option_values in a model configuration YAML. Random draws depend only on the seed, the location and the period, so results are reproducible.

Required covariates: rainfall, mean_temperature.

Usage

chap simulate \
    --model-name https://github.com/chap-models/climate_simulation_model \
    --dataset-csv covariates.csv \
    --out-file simulated.csv \
    --model-configuration-yaml config.yaml

config.yaml:

user_option_values:
  seed: 1
  rainfall_effect: 0.5

Continuing a simulation

Rows in the input that already have disease_cases are kept as they are, and only the missing rows are simulated, in time order. To continue a simulation, for example every week, append the covariates for the new periods to the previous output with disease_cases left empty and run chap simulate again on that file. The result is the same as simulating all periods in one run.

About

Minimal chap simulation model: autoregressive Poisson disease cases driven by lagged rainfall and temperature, for chap simulate

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages