simulate Command Reference¶
The simulate command runs a model's optional simulate entry point to generate disease data for the locations and periods in a covariate CSV.
Synopsis¶
Description¶
chap simulate:
- Loads the model template from a local MLProject directory or a GitHub URL.
- Loads covariates from a CSV file (auto-discovering the matching
.geojsonif present). The CSV does not need adisease_casescolumn; rows that have one are kept as observed history. - Invokes the MLProject's
simulateentry point. - Checks that the output covers the same locations and periods, has the target for every row, and keeps the observed values unchanged.
- Writes the result to
out_file, plus a.geojsonnext to it if the input had polygons.
Each parameter can also be passed as a keyword flag (--model-name, --dataset-csv, --out-file). The output is a regular Chap dataset and can be used with chap eval. See Additional Configuration → Simulate Entry Point for how to define the entry point.
Options¶
| Parameter | Description | Default |
|---|---|---|
--model-configuration-yaml |
YAML file with user_option_values, e.g. simulation parameters or a seed |
None |
--run-config.ignore-environment |
Skip automatic environment setup | false |
--run-config.debug |
Enable verbose debug logging | false |
Example¶
chap simulate \
--model-name tests/fixture_models/climate_simulation_model \
--dataset-csv ./covariates.csv \
--out-file ./simulated.csv
To continue a simulation, append the new periods' covariates to the previous output (leaving disease_cases empty for them) and run the command again on that file. Only the new periods are simulated.