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.
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.
chap simulate \
--model-name https://github.com/chap-models/climate_simulation_model \
--dataset-csv covariates.csv \
--out-file simulated.csv \
--model-configuration-yaml config.yamlconfig.yaml:
user_option_values:
seed: 1
rainfall_effect: 0.5Rows 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.