module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

Attribute-based Distributions

Open jawalonoski opened this issue 7 years ago • 6 comments
trafficstars

Distributions can be based off attribute values (the wiki was wrong):

For example:

"distribution": { "attribute" : "probability_of_fall_injury", "default" : 0.06 },

See https://github.com/synthetichealth/synthea/issues/289

jawalonoski avatar Apr 10 '18 21:04 jawalonoski

https://github.com/synthetichealth/synthea/wiki/Generic-Module-Framework%3A-Transitions#named-probabilities

jawalonoski avatar Apr 12 '18 12:04 jawalonoski

Interesting, this is a powerful feature and enables some pretty cool system-dynamics type modeling.

arscan avatar May 21 '18 17:05 arscan

@jawalonoski it looks like this already exists. When looking at a distributed transition, click on 'Change to named transition', and you get a view like this (on the second transition):

screen shot 2018-05-21 at 2 27 50 pm

It appears to show up in the JSON correctly too. Am I missing something?

I should change 'Weight' to 'Default Weight', and remove hte 'not adding up to 100%' warning, as that value is expected to change over time though.

arscan avatar May 21 '18 18:05 arscan

And I guess if any of the transitions are named, we should allow any number, instead of constraining to 0-1, right?

arscan avatar May 21 '18 18:05 arscan

Correct, if any transitions are named, you could say something like "Weights might not add up to 100% when using named transitions." Otherwise, you can use the current warning language.

jawalonoski avatar May 21 '18 19:05 jawalonoski

Changed Weight to Default Weight in #181

Will leave open to handle the 'not add up to 100' case, but will set to 'low priority enhancement' as it doesn't prevent usage.

arscan avatar May 22 '18 18:05 arscan