Skip to content

[Bug]: Sampling parameters from distributions not working as intended #406

@alsnhll

Description

@alsnhll

Label

bug, gempyor

Priority Label

high priority

Describe the bug/issue

when specifying parameters in the seir or outcomes section of a config, there is an option to specify a distribution, e.g.

seir:
  parameters:
    Ro:
      value: 
        distribution: truncnorm
        mean: 2.5
        sd: 0.1
        a: 1.1
        b: 3

The expected behavior is

  1. For each slot, a new random value of the parameter is drawn
  2. For multiple scenarios run from the same config, scenarios corresponding to the same slot should use the same value of all parameters

For seir parameters, neither (1) nor (2) is working. One random parameter is drawn and used for all slots, and each scenario has its own value.
For outcomes parameters, (1) is working but (2) is not. All scenarios and all slots have unique parameters

I haven't checked the behavior for seir_modifier (snpi) or outcome_modifier (hnpi) parameters yet but will update when I do.

To Reproduce

To see this problem for seir and outcome parameters, run this config (using a single call of gempyor-simulate) and look at the spar or hpar output files by slot and by scenario: https://github.com/HopkinsIDD/flepimop_sample/blob/main/config_sample_2pop_vaccine_scenarios.yml

Environment, if relevant

No response

Metadata

Metadata

Labels

bugDefects or errors in the code.gempyorConcerns the Python core.high priorityHigh priority.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions